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

Newline after [list] generates invalid HTML #11

Open
eazrael opened this issue Feb 16, 2019 · 2 comments
Open

Newline after [list] generates invalid HTML #11

eazrael opened this issue Feb 16, 2019 · 2 comments
Assignees

Comments

@eazrael
Copy link

eazrael commented Feb 16, 2019

[list]
[*] Reduced enemy count in Furies Wings
...

will be converted to

<ul><br/>
</li><li> Reduced enemy count in Furies Wings<br/>
...

The line break after the <ul> is in a <li> tag which never was opened.

My proposal is to add something like "allowedChildTags" to the Tag class, so that after opening a list only [*] [li] is allowed. No idea what to if that is not the case. The keepLines behaviour needs also to be adapted.

@chriskonnertz chriskonnertz self-assigned this Feb 19, 2019
@chriskonnertz
Copy link
Owner

Hello,

thank you for your feedback.

Well you will always be capable of writing BBCode that will result in HTML code that a HTML validator would call "incorrect". I did not even try to solve that problem - that's too much of a challenge. But you are right, this is such a big problem that I am willing to classify it as a bug.

I have to dig into the code to really understand why this happens.

@eazrael
Copy link
Author

eazrael commented Feb 20, 2019

Hi,
thanks for accepting this as a bug. I think this is nothing uncommon to separate the list tag and the items with new lines, so I assume it should have been hit before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants