After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 530758 - gtk-doc should not expand XML tags and their attributes
gtk-doc should not expand XML tags and their attributes
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: 1.11
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-30 17:09 UTC by Behdad Esfahbod
Modified: 2008-05-05 10:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Behdad Esfahbod 2008-04-30 17:09:01 UTC
The following is breaking pango's doc build:

<ulink url="http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries">

because gtk-doc is expanding "#Grapheme_Cluster_Boundaries" to link to it.
I tried:

<ulink url="http://www.unicode.org/reports/tr29/&#35;Grapheme_Cluster_Boundaries">

but that didn't help as it still has a hash sign in it...

Any ideas how to work around for now?
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2008-05-05 06:47:15 UTC
I found the problematic code. Unfortunately a CDATA section can't be used to work around. I've added a tets case to svn and update this ticket when I have a workaround and/or fix.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2008-05-05 07:24:58 UTC
Okay, these are the alternatives:

#1: I have a patch for gtk-doc to check for a leading '\' to escape the special purpose of %,@,#. That means your need to require gtk-doc-1.11 once its out and then you can use the local anchor but need to cange it to:
<ulink url="http://www.unicode.org/reports/tr29/\#Grapheme_Cluster_Boundaries">

Verdict: ugly


#2: I could check that the character before %,@,# is any of [\s,;] (are those enough?). This mean it will just work with newer gtk-doc and you don't need to modify the anchors.

Verdict: slightly better, might be fragile

#3: Don't expand anything inside sgml tags. Need to igure ou how to do it.

Verdict: Might be the best option.

So all together - no workaround :/ I've tried to rewrite the uri using %23 for the #, but guess what - gtk-doc tried to link to a constant named 23Grapheme_Cluster_Boundaries - bah.

Comment 3 Behdad Esfahbod 2008-05-05 07:28:58 UTC
Ideally both #1 and #3 should be implemented.

Thanks.
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2008-05-05 10:56:43 UTC
2008-05-05  Stefan Kost  <ensonic@users.sf.net>

	* gtkdoc-mkdb.in:
	* tests/bugs/docs/tester-sections.txt:
	* tests/bugs/src/tester.h:
	  Don't expand '#' in ulink tags. Also allow to escape "#%@" with '\'.
	  Add to testsuite. Fixes #530758