Hi Dominic, Thanks for the reply.
Indeed it needs to be escaped but FireFox 3.5 does not seem to download the script correctly. If I change the & to be & in the generated HTML file, it then works. I do not think that the issue is with bit.ly but the browser then? Generated and not working: <script type="text/javascript" charset="utf-8"> src="http://bit.ly/javascript-api.js?version=latest&login=statsvn&apiKey=R_2c362b417d0517c27876cbaca1bb68cc"></script> Modified and working: <script type="text/javascript" charset="utf-8"> src="http://bit.ly/javascript-api.js?version=latest&login=statsvn&apiKey=R_2c362b417d0517c27876cbaca1bb68cc"></script> Any suggestion so that the html geneated by xdoc would match the second form? or another type of encoding/escaping? Thanks Benoit Dominic Mitchell wrote: > > On 19 Aug 2009, at 16:48, BenoitX wrote: >> I need to generate an XDOC with a header that contains a link to a >> javascript. So far, no problem. >> >> However, the URL where the code is contains a "&" >> >> <script type="text/javascript" charset="utf-8" >> src="http://bit.ly/javascript-api.js?version=latest&login=statsvn&apiKey=R_2c362b417d0517c27876cbaca1bb68cc >> >> "></script> >> >> This causes the xdoc plugin to fail (not valid XML). >> > > That's correct behaviour — you have to escape all ampersands in XML in > order for it to be well-formed. > >> If I replace this "&" by "&" the xdoc does not complain BUT I >> end up >> with & in the html generated and this means that the link does >> not work >> as planned... > > It certainly should do. Which browser is interpreting the link > incorrectly? > >> I've tried to read as much a possible on xdoc format... and I tried: >> 1/ <escapeXml> : it fails >> 2/ <!CDATA[[ ... : the script is NOT included in the HTML at the >> end... >> >> How could I do this? > > You can't. You have to escape the ampersand. > > -Dom > -- View this message in context: http://n2.nabble.com/XDoc-and-%22-%22-in-a-URL...-tp3473248p3473830.html Sent from the maven users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
