Welcome! » Log In » Create A New Profile

Error collecting/validation

Posted by Ambush Commander 
Error collecting/validation
September 02, 2008 02:23PM

The main feature we're planning to ship with HTML Purifier 3.2 is improved error collection and reporting. The plan is to make things more line/column oriented, so every error will be bound to a specific line/column on the document, which in theory you should be able to click and have your textarea move automatically to.

This is a request for mockups for two different types of interfaces; a non-JavaScript interface, and a JavaScript interface.

The non-JavaScript interface would be a normal listing of errors. If we look at the W3C validator, we can immediately rip and steal some ideas:

Line 4, Column 5: error text
<body>Context HTML</body>
Explanation text

I must admit, however, that I haven't used the validator very much and, when I have, found it's interface clunky for fixing errors in my documents. Also, with a little more context-sensitivity we can give much more helpful messages than W3C; HTML Purifier knows about the most common remedies to problems and can suggest them accordingly to users.

The JavaScript interface might be a regular text editor, but with icons and highlighted lines in places where there were errors. A user could click the icon to bring up the error console, and then make the appropriate changes and dismiss it. Admittedly, I don't know how feasible this is.

Think big, think grand. We'll pare things down with technical considerations later.

Re: Error collecting/validation
May 24, 2018 12:21AM
Your Email:


HTML input is enabled. Make sure you escape all HTML and angled brackets with &lt; and &gt;.

Auto-paragraphing is enabled. Double newlines will be converted to paragraphs; for single newlines, use the pre tag.

Allowed tags: a, abbr, acronym, b, blockquote, caption, cite, code, dd, del, dfn, div, dl, dt, em, i, ins, kbd, li, ol, p, pre, s, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, var.

For inputting literal code such as HTML and PHP for display, use CDATA tags to auto-escape your angled brackets, and pre to preserve newlines:

Place code here

Power users, you can hide this notice with:

.htmlpurifier-help {display:none;}