[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#522527: Escape description text with --color html



Raphael Geissert <atomo64+debian@gmail.com> writes:
> Richard Kettlewell wrote:
> [...]
>> 
>> The attached patch arranges for '--color html' output to be properly
>> escaped.  Without it, if you look at the output in a web browser, things
>> like the <pkg> in no-copyright-file's /usr/share/doc/<pkg>/copyright can
>> disappear.
>
> Attached mbox contains a patch fixing this bug the way I think it should be
> fixed:
>
> Properly escaping some characters from the tag line (<&>, not just <& as the
> originally proposed patch), and by calling description('html',...) which
> ensures <i>, <em>, and <tt> are preserved.

Yeah, I was just thinking the same thing.  This looks better to me.  If we
know the output is HTML, we should preserve the markup in the descriptions.

I wonder if we should go all the way to making this a separate output
format, with the color option retained for backward compatibility.  I
think that was proposed a while back.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: