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

Would-be attributes on invalid tags being eaten during parse #54

Closed
ottworks opened this issue Jan 6, 2020 · 3 comments · Fixed by #58
Closed

Would-be attributes on invalid tags being eaten during parse #54

ottworks opened this issue Jan 6, 2020 · 3 comments · Fixed by #58
Assignees
Labels
bug Something isn't working

Comments

@ottworks
Copy link

ottworks commented Jan 6, 2020

With onlyAllowTags set to ['b', 'i', 'u'], this happens:

Input: hello [blah foo="bar"]world[/blah]

Output: hello [blah]world[/blah]

It's still returned as a string in the AST, but there's some sort of pre-processing going on that strips out the would-be attributes.

Repro: https://jsfiddle.net/6acujnf5/3/

@ottworks ottworks changed the title @bbob/parser: Would-be attributes on invalid tags being eaten during parse Would-be attributes on invalid tags being eaten during parse Jan 6, 2020
@JiLiZART
Copy link
Owner

JiLiZART commented Jan 7, 2020

Thanks for reporting, kinda token toString function fails :(

@JiLiZART JiLiZART self-assigned this Jan 8, 2020
@JiLiZART JiLiZART added the bug Something isn't working label Jan 8, 2020
@JiLiZART
Copy link
Owner

I deploy fix for this problem in about 2-3 days

JiLiZART added a commit that referenced this issue Apr 12, 2020
* feat(parser): write test for only allowed tags parsing

* chore(parser): rename only allowed test

* fix(parser): only allowed tag rendering

* fix(plugin-helper): add new TagNode toString tests
@JiLiZART
Copy link
Owner

Good news! Problem solved. I deploy release soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants