W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > October 2013

[Bug 12235] Make <xmp> conforming

From: <bugzilla@jessica.w3.org>
Date: Sun, 13 Oct 2013 03:10:33 +0000
To: public-html-bugzilla@w3.org
Message-ID: <bug-12235-2486-2B8mof9aje@http.www.w3.org/Bugs/Public/>

--- 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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 16:31:44 UTC