tags 512579 patch thanks Hello,
On Thu, Jan 22, 2009 at 12:36:35AM +0100, Simon Paillard wrote: > > As noticed by Jean-Baka, non breakable spaces in links are not correctly > rendered in the html version if they are used as a tag attribute : > are modified in \|[nbsp ]\| while they should not be modified at > all. > (Same with 1.2.9) Here is a patch to fix this issue. I had to remove the normalization in Driver.pm::start_url() because otherwise, [nbsp ] is changed to [nbsp ], which breacks the sdata conversion. I don't think it will have any drawback for the supported formats. The usage of _cdata in _output_url is similar to other modules (LaTeX, text, ...). Maybe the SGML and XML module would require the same fix. Best Regards, -- Nekral
diff -rauN ../orig/debiandoc-sgml-1.2.9/tools/lib/Format/Driver.pm ./debiandoc-sgml-1.2.9/tools/lib/Format/Driver.pm --- ../orig/debiandoc-sgml-1.2.9/tools/lib/Format/Driver.pm 2008-05-15 09:59:58.000000000 +0200 +++ ./debiandoc-sgml-1.2.9/tools/lib/Format/Driver.pm 2009-01-21 21:48:53.315812077 +0100 @@ -913,7 +913,7 @@ { ( $element, $event ) = @_; my $id = _normalize( _a( 'ID' ) ); - my $name = _normalize( _a( 'NAME' ) ); + my $name = _a( 'NAME' ); $name = "" if ( $name eq '\|\|' ) || ( $name eq '\|urlname\|' ) || ( $name eq $id ); &{$Format."::"._output_url}( $id, $name ) if length( $id ); diff -rauN ../orig/debiandoc-sgml-1.2.9/tools/lib/Format/HTML.pm ./debiandoc-sgml-1.2.9/tools/lib/Format/HTML.pm --- ../orig/debiandoc-sgml-1.2.9/tools/lib/Format/HTML.pm 2008-05-15 09:59:58.000000000 +0200 +++ ./debiandoc-sgml-1.2.9/tools/lib/Format/HTML.pm 2009-01-23 13:38:49.760452725 +0100 @@ -952,7 +952,9 @@ { my $url = URI->new( $_[0] ); $_[1] = $_[0] if $_[1] eq ""; - output( "<code><a href=\"$url\">$_[1]</a></code>" ); + output( "<code><a href=\"$url\">" ); + _cdata( $_[1] ); + output( "</a></code>" ); } ## ----------------------------------------------------------------------