-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The a element in HTML5 #51
Comments
Presumably a fairly simple fix? $def->addElement('a', 'Inline', 'Flow', 'Common'); |
Hi @bytestream, $config = HTMLPurifier_HTML5Config::createDefault();
$config->set('Core.LexerImpl', 'DirectLex');
// now <A> won't be autoclosed when a <TABLE> is encountered |
Hey, thanks for the quick reply. It should be default functionality though, given this lib advertises as HTML5 support and an anchor with block level elements is supported in HTML5? DOMDocument doesn't support HTML5 so while that's used, this lib can never fully be HTML5 friendly. What are the implications of switching to DirectLex? htmlpurifier docs seem to suggest DirectLex is the default PHP 4 lexer which is a bit old school... |
I'm not happy with DirectLex as a replacement based on these comments:
Perhaps time to look at replacing PH5P with https://github.com/Masterminds/html5-php |
Unfortunately Switching lexer to html5-php sounds like a proper solution. It's definitely doable, but requires more development time (which unfortunately I don't have at the moment). |
Would you accept that here or should I send it to htmlpurifier? It's pretty simple to replace PH5P with masterminds/html5-php and it seems to resolve the issue I've mentioned here. |
Segmentation fault started occuring after adding test case related to issue #51
I'd gladly accept it here, thanks 🙂. I would prefer, however, to keep the default lexer intact ( |
Sent :) but pending feedback for two issues posted to masterminds/html5 |
HTML5 parsing issues resolved by #52. Closing. |
Example:
becomes
The text was updated successfully, but these errors were encountered: