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

Fixed issue #16896: Javascript shown when editing subquestions #1686

Conversation

gabrieljenik
Copy link
Collaborator

The HTML breaks when the subquestion's text contains double quotes (").
Added "escape('html_attr')" to subquestion text and code (subquestionRow.twig).

It seems the same happens with other fields (like the "Array filter" attribute, just to mention one).
To be checked on #16904

The HTML breaks when the subquestion's text contains double quotes (").
Added "escape('html_attr')" to subquestion text and code (subquestionRow.twig).

It seems the same happens with other fields (like the "Array filter" attribute, just to mention one).
To be checked on #16904
@Shnoulle
Copy link
Collaborator

Why not |escape directly ? Why escape('html_attr') ?

@gabrieljenik
Copy link
Collaborator Author

Why not |escape directly ? Why escape('html_attr') ?

As per documentation:
html: escapes a string for the HTML body context.
html_attr: escapes a string for the HTML attribute context.

The latest seem to apply more to the context :)

Copy link
Collaborator

@Shnoulle Shnoulle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{{ subquestion.title|escape('html') }} when it's html (thanks for the explanation)

@Shnoulle
Copy link
Collaborator

:D

@Shnoulle Shnoulle self-requested a review December 11, 2020 14:47
@cdorin93 cdorin93 added the Tested OK This PR has been tested by QA and works as expected label Dec 11, 2020
@olleharstedt
Copy link
Collaborator

Thanks for fixing my 💩 😆 ❤️

@olleharstedt olleharstedt merged commit 2be4a03 into LimeSurvey:develop Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tested OK This PR has been tested by QA and works as expected
Projects
None yet
4 participants