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

🐛 Repetitive HTML characters escaping #43

Open
AyhamAl-Ali opened this issue Jun 11, 2023 · 3 comments
Open

🐛 Repetitive HTML characters escaping #43

AyhamAl-Ali opened this issue Jun 11, 2023 · 3 comments
Labels
backend Issues that require backend code changes (java) bug Something isn't working

Comments

@AyhamAl-Ali
Copy link
Member

Original example: "message \"You're holding a <%color of tool%>%color of tool%<reset> wool block\"

Result
image

@AyhamAl-Ali AyhamAl-Ali added bug Something isn't working backend Issues that require backend code changes (java) labels Jun 11, 2023
@Romitou
Copy link
Member

Romitou commented May 9, 2024

This is because escaping is carried out several times. As the & are replaced by &amp;, the escaped value is escaped again and again.
https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/doc/HTMLGenerator.java#L598-L601

@Moderocky
Copy link
Member

This generator seems a bit chaotic in general, maybe we can use something like hypertext instead?

@Romitou
Copy link
Member

Romitou commented May 9, 2024

Personally, I think it would be a good idea to generate client-side documentation with lazy loading. Provide the docs.json file in a versioned way on each deployment and then do the magic stuff on the client side. This seems to me to be much simpler in terms of managing the documentation and in terms of the developer and user experience, but I understand that the team might not necessarily want that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Issues that require backend code changes (java) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants