[webkit-help] [webkit-dev] Disable the automated markup fixes

Aaron Lewis the.warl0ck.1989 at gmail.com
Tue Apr 2 20:11:26 PDT 2013


Hi Ryosuke,

On 20:08 Tue 02 Apr     , Ryosuke Niwa wrote:
> Let us first move to webkit-help since your question is not related to the
> development of WebKit.

Already posted there ;-P

> 
> On Tue, Apr 2, 2013 at 6:53 PM, Aaron Lewis <the.warl0ck.1989 at gmail.com> wrote:
> 
>     I'm running a test app with QtWebkit, looks like webkit is attempting
>     to fix invalid markups automatically,
> 
>     For page contents like this,
> 
>     <body><><br/>&lt;&gt;</body>
> 
>     The first <> is considered invalid if refer to W3C standards, thus
>     webkit would encode it to &lt;&gt;
> 
> 
> I don't think that's what's happening. The above markup generates the following
> DOM tree:
> 
>   • body element
>       □ Text "<>"
>       □ br element
>       □ Text "<>"
> 
> 
>     Can this feature be turned off?
> 
> 
> I don't think so.
> 
> On Tue, Apr 2, 2013 at 6:58 PM, Aaron Lewis <the.warl0ck.1989 at gmail.com> wrote:
> 
>     But I checked the source code, the "createMarkup" function is from
>     WebCore, so it's not about QtWebkit, right?
> 
> 
> createMarkup is a function we use to serialize DOM. When the DOM tree as parsed
> above is serialized via this function, we generate (assuming we've parsed it as
> a HTML document):
> <body>&lt;&gt;<br>&lt;&gt;</body>
> 
> It appears that what you want is for WebKit to generate:
> 
> <body><><br>&lt;&gt;</body>
> 
> Perhaps, in order to preserve the original code?  But this is not going to work
> because the HTML5 parsing algorithm is not invertible. Some information is
> permanently lost once you've pushed a markup through the parser.
> 
> - R. Niwa
> 

-- 
Best Regards,
Aaron Lewis - PGP: 0xDFE6C29E ( http://pgp.mit.edu/ )
Finger Print: 9482 448F C7C3 896C 1DFE 7DD3 2492 A7D0 DFE6 C29E


More information about the webkit-help mailing list