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

HtmlResponseWriter typo or bug? #5517

Open
pizzi80 opened this issue Oct 17, 2024 · 1 comment
Open

HtmlResponseWriter typo or bug? #5517

pizzi80 opened this issue Oct 17, 2024 · 1 comment

Comments

@pizzi80
Copy link
Contributor

pizzi80 commented Oct 17, 2024

https://github.com/eclipse-ee4j/mojarra/blob/master/impl/src/main/java/com/sun/faces/renderkit/html_basic/HtmlResponseWriter.java#L503

At line 503 the actual condition for escaping or not is:

if (!withinScript && !withinScript) {
    dontEscape = false;
}

which is obviously a typo or a bug...

if it's a typo we could remove the second part,
but reading the code my suspect is that it should be
the same condition of line 421!

// always turn escaping back on once an element ends
if (!withinScript && !withinStyle) {
    dontEscape = false;
}
@BalusC
Copy link
Contributor

BalusC commented Oct 19, 2024

Yes it's a typo / copy-paste-error. Feel free to PR/fix it.

pizzi80 added a commit to pizzi80/mojarra that referenced this issue Oct 21, 2024
@pizzi80 pizzi80 mentioned this issue Oct 21, 2024
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