Skip to content

feat: allow use of text/plain for script tag#282

Merged
dg merged 1 commit into
nette:masterfrom
lubomirblazekcz:patch-1
Feb 17, 2022
Merged

feat: allow use of text/plain for script tag#282
dg merged 1 commit into
nette:masterfrom
lubomirblazekcz:patch-1

Conversation

@lubomirblazekcz

Copy link
Copy Markdown
Contributor
  • bug fix / new feature?
  • BC break? yes
  • doc PR: nette/docs#???

For GDPR usage most scripts must be set as text/plain, but latte doesn't handle types in variables with this type.

eg. here - https://orestbida.com/demo-projects/cookieconsent/

This PR fixes it, but might cause bc break, if anyone used the text/plain and inserted quotes manualy

eg.
Do not place {$test} inside quotes in .../templates/@layout.latte:20

But this change is definitely needed, because if you would want to make the cookieconsent for scripts conditional, there would be problems with the js variables being or not being processed with latte.

@dg

dg commented Feb 17, 2022

Copy link
Copy Markdown
Member

Thanks

@dg dg merged commit f03e805 into nette:master Feb 17, 2022
dg pushed a commit that referenced this pull request Feb 17, 2022
dg pushed a commit that referenced this pull request Feb 18, 2022
dg pushed a commit that referenced this pull request Feb 18, 2022
dg pushed a commit that referenced this pull request Feb 22, 2022
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

Successfully merging this pull request may close these issues.

2 participants