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

Can't get html-head replacement to work #1659

Closed
michelsantos10 opened this issue Jan 23, 2024 Discussed in #1415 · 2 comments
Closed

Can't get html-head replacement to work #1659

michelsantos10 opened this issue Jan 23, 2024 Discussed in #1415 · 2 comments

Comments

@michelsantos10
Copy link

Discussed in #1415

(UI Settings - Inject some css or javascript does not work on 0.24.0)

Originally posted by dstrivelli January 17, 2023
Between updates from 0.23.0 to the current Dev version, the html-head replacement appears to have stopped working.

image

When I rollback to the 0.23.0 version, my defined snippet is replaced into the HTML head as expected.

CAUSE

The HTML code generated in version 0.24.0 is not the same as in 0.23.0 and the html-head replacement method fails.

html code generated in 0.24.0 html code generated before 0.24.0
<meta name="html-head" content="replace"/> <meta name="html-head" content="replace">

Notice that there is a slash at the end that was added in version 0.24.0. In the StaticFilter.java class, line 75, this is where the "html-head" is replaced. Note that the bar at the end is not taken into account, and this means that it does not match and the value is no longer replaced.

Please be aware that a trailing slash was introduced in version 0.24.0. The replacement of "html-head" occurs in the StaticFilter.java class class, specifically on line 75. It's important to note that the trailing slash is not considered during this process, resulting in a mismatch. Consequently, the value is not replaced.

@AlexisSouquiere
Copy link
Collaborator

This feature is working fine on dev.
It has been fixed in #1489

@michelsantos10
Copy link
Author

Sure, thank you for the feedback! I will close this issue.

@github-project-automation github-project-automation bot moved this from Backlog to Done in Backlog Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants