question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

<raw> tags are not escaping {{ }} variables

See original GitHub issue
  • Maizzle Version: 3.2.0
  • Node.js Version: 15.11.0

This is essentially https://github.com/maizzle/framework/issues/171 come back. If I downgrade to framework 3.1.6, it works fine.

Example

This markup —

<raw>
    <p>Hey {{ .Name }}!</p>
</raw>

is turned to —

<p>Hey undefined!</p>

in framework 3.2.0.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
cossssmincommented, Mar 11, 2021

OK, so some of the reasons we evaluate expressions last were the <fetch> tag and possibly components.

Right now this also breaks the <fetch> tag functionality.

1reaction
cossssmincommented, Mar 11, 2021

I’m looking into removing this line in the posthtml generator, now since we also run it in the layouts plugin:

https://github.com/maizzle/framework/blob/adfdcd4ff60500f2eac12097a07bdd36ba3e0d9d/src/generators/posthtml.js#L57

I remember there was a reason why we needed to run the expressions plugin last, but I just can’t remember. Need to test this more…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prevent escaping HTML tags inside variable #1490 - GitHub
Prevent escaping HTML tags inside variable #1490 ... I've tried {% raw %} but that only disables the processing of Liquid tags themselves....
Read more >
How to escape liquid template tags? - Stack Overflow
it is possible to disable liquid processing engine using the raw tag: ... You can assign plain text to a variable, and display...
Read more >
bash - Escape a variable for use as content of another script
My goal is to enable a script to generate other scripts. This is because the tasks in the generated scripts will run anywhere...
Read more >
String.raw() - JavaScript - MDN Web Docs
The static String.raw() method is a tag function of template literals. ... (e.g. ${foo}) are processed, but escape sequences (e.g. \n) are not....
Read more >
Auto-escaping and output formats - Apache FreeMarker Manual
Output formats; Overriding the output format in templates; Disabling auto escaping; "Markup output" values; Further details and tricky cases.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found