Skip to content
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

Content inside invalid-tag not parsing #36

Open
nokimaro opened this issue Dec 16, 2014 · 2 comments
Open

Content inside invalid-tag not parsing #36

nokimaro opened this issue Dec 16, 2014 · 2 comments
Labels

Comments

@nokimaro
Copy link

Code definition from example to [color] with OptionValidator

$builder = new CodeDefinitionBuilder('color', '<span style="color: {option}">{param}</span>');
$builder->setUseOption(true)->setOptionValidator($CssColorValidator);

Here is text with invalid option in [color]

[b] bold text
  [color=!nvaL!d_color]
    [u] must be underline[/u]
  [/color]
[/b]

Result is

<b> bold text
[color=!nvaL!d_color] [u] must be underline [/u] [/color]
</b>
@nokimaro
Copy link
Author

I think if setParseContent() is true and we have only OptionValidator then we must parse content ({param}) even if option invalid.
Or it's unsafe?

@jbowens jbowens self-assigned this Feb 16, 2015
@jbowens jbowens added the bug label Feb 16, 2015
@Kubo2
Copy link
Contributor

Kubo2 commented Jul 6, 2015

@nokimaro No, it isn't. Invalid node should be let as-is, and the content "inside" it (which isn't really inside it, beacuse the node should be removed from the AST/DOM when it is invalid) should be normally parsed. That's the thing, the content "inside" invalid node isn't really a child node, because there's no (valid) parent node.

@jbowens jbowens removed their assignment Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants