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

Decode HTML entities before validating tokens #240

Merged
merged 1 commit into from
Apr 19, 2022
Merged

Conversation

aschempp
Copy link
Member

@aschempp aschempp commented Sep 6, 2021

fixes #239

@aschempp
Copy link
Member Author

aschempp commented Sep 6, 2021

But I wonder why the equal signs are encoded if the field is set to decodeEntities = true?

@fritzmg
Copy link
Collaborator

fritzmg commented Sep 6, 2021

But I wonder why the equal signs are encoded if the field is set to decodeEntities = true?

They shouldn't in 4.9.x-dev, should they @ausi ?

@ausi
Copy link

ausi commented Sep 6, 2021

But I wonder why the equal signs are encoded if the field is set to decodeEntities = true?

They shouldn't in 4.9.x-dev, should they @ausi ?

If you enable allowHtml, equal signs get encoded except valid ones from HTML attributes. Without allowHtml they should not get encoded.

@aschempp
Copy link
Member Author

aschempp commented Sep 6, 2021

If you enable allowHtml, equal signs get encoded except valid ones from HTML attributes. Without allowHtml they should not get encoded.

Which is intended in this case, since this is a tinyMCE field where we need simple tokens:
https://github.com/terminal42/contao-notification_center/blob/main/dca/tl_nc_language.php#L288

@aschempp
Copy link
Member Author

@ausi should this PR still be required or has it been fixed by contao/contao#3390?

@ausi
Copy link

ausi commented Oct 21, 2021

I’m not sure. The code of library/NotificationCenter/AutoSuggester.php looks like you implemented your own simple token parsing? If so, this PR is still required I think.

@contaoacademy
Copy link
Contributor

I have also this problem. Can you release this fix?

@aschempp aschempp merged commit e78b927 into main Apr 19, 2022
@aschempp aschempp deleted the bugfix/entities branch April 19, 2022 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error saving mailtemplates with if queries + module variables
4 participants