[Bug 12235] Make <xmp> conforming

https://www.w3.org/Bugs/Public/show_bug.cgi?id=12235

--- Comment #18 from Tab Atkins Jr. <jackalmage@gmail.com> ---
(In reply to Carl Smith from comment #17)
> Can this be reconsidered?
> 
> I have an application that amounts to a shell, where the front end runs in
> the browser, similar to the IPython Notebook. It uses <xmp> to wrap output.
> 
> The output must be converted to HTML, which involves preserving all
> whitespace, including tabs (think `ls -la`).
> 
> Converting every space to &nbsp; and every new line to <br> and then
> converting tabs into HTML tables, doesn't actually cover all the edge cases,
> and it takes ages, and roughly doubles the size of the output.
> 
> output = '<xmp>'+output+'</xmp>'; // works perfectly
> 
> It's been pointed out that there are ways to hack the same effect by
> combining a bunch of other tags, but is that really what we want in HTML5?
> 
> Please reconsider.

<xmp> doesn't preserve whitespace by default.  It sounds like you just need to
do a quick round of escaping (escape & and <), then put it in a <pre>.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Sunday, 13 October 2013 03:10:35 UTC