-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Using the diff function, output is not escaped. #75
Comments
This is fixed in v5.0.0 and I included an automated test for this, thanks! |
@zachleat Unfortunately, just having tested this in my local it's still producing an HTML illegal tag error. Again output is fine when using the non diff tag, but when using for example "diff-html" it produces this error for me. It claims I should be using Referring to the above code error and cutting it down to the identified character in question ...
I think the syntax highlighter is causing this by adding a '<' somewhere in the output. This is with v5.0.0 |
Okay, I think I've identified when/why this is happening. For context: I created a re-useable include file which was using So the issue is when there are no diffing indicators used within To get around this, using flag on the include i.e Ideally though, the html output should be valid no matter if diffing is set, and or the containing code does/does not have a |
Using vite/slinkity to develop eleventy site along with this plugin.
Vite is fine with:
But not with ...
I get a vite error, because vite doesn't like non escaped html code (via vite error)
The vite error:
I've tried putting a safe filter around the include to ensure nunjucks escapes the included html file, but no dice.
Not using the diff and just using the shortcode normally, outputs escaped code without the vite error.
Does this mean the diff function is processing the 'output' content differently?
The text was updated successfully, but these errors were encountered: