xslTNG icon indicating copy to clipboard operation
xslTNG copied to clipboard

Cross reference broken because URI is escaped

Open fsteimke opened this issue 7 months ago • 2 comments

Please see the attached sample.zip

article.xml contains a cross reference to a section with xml:id='übersicht' . Processing with the Stylesheets version 2.5.0 leads to HTML where the id is untouched (<section id="übersicht"/>), but the a/@href value is uri escaped: <a href="#%C3%BCbersicht"/>, so that the link doesn't work.

Solution is to add <xsl:output escape-uri-attributes="no"/> to docbook.xsl. Workaround is to avoid xml:id values where uri-escaped value is different from original value.

Greetings, Frank

fsteimke avatar May 23 '25 06:05 fsteimke

That's an interesting one. I'm a little concerned about possible consequences where attribute values contain things that should be escaped. I'm a little surprised that the browser doesn't do the right thing with the escaped value.

ndw avatar May 26 '25 07:05 ndw

Sorry, I forgot to mention that i noticed issues with PDF Rendering engines (Antenna House Formatter, running at Windows as well as Weasyprint running on Linux) with escaped @href values. No Issues with HTML Browsers.

Maybe i should send a bug report to the Antenna House company? And Weasyprint?

fsteimke avatar May 27 '25 04:05 fsteimke