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.

Version 1.07 breaks templating with HTML

See original GitHub issue

This change in Version 1.07 var formatted = this.display(selection, $rendered); to var formatted = Utils.entityDecode(this.display(selection, $rendered));

strips any HTML from the rendered selected item.

This stops you from being able to use html for styling of the selected item, via templating as per the documentation for select2: https://select2.org/selections.

For this reason I have had to dequeue selectWoo in Wordpress and load select2 itself.

Sorry for lack of example - but it is self-evident.

How big a security issue is the un-escaped HTML?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

3reactions
suncommented, Feb 3, 2021

The issue is still causing problems today.

1reaction
acf-extendedcommented, Jul 9, 2021

Hello @fabianmarz,

Thanks for the feedback!

I don’t modify the core files since I simply disable the script enqueue to let ACF use the correct select2 JS library instead, as explained in my comment.

I posted the JS code here to explain where the problem come from, so anyone can test the fix with dist files. I already ran multiple version compare on this library and I don’t have the time dig further to point you the exact location of those lines in the source.

So I will let core developers decide if this fix is correct or not. I’m sure they know better where those lines are in source files anyway.

Thanks for the thumbs down!

Have a nice day.

Regards.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML::Template::Compiled - MetaCPAN
It's possible since version 0.69 to inherit from HTML::Template::Compiled. It's just not documented, and internal method names might change in the near future....
Read more >
Markdeep - Casual Effects
Added corporate API and whitepaper templates. 2019-11-29 Version 1.07. Improved printing quality. Added support for escaped backticks \` to prevent inline code ...
Read more >
HTML::Template::Compiled(3pm) — libhtml-template-compiled-perl ...
HTML ::Template::Compiled is a template system which can be used for HTML::Template templates with almost the same API. It offers more flexible template...
Read more >
Problem with HTML Template pages breaking when they are ...
I moved some html files that were created from the Daylight HTML Template pages to a new folder​ in Manage Files and it...
Read more >
transform - CSS: Cascading Style Sheets - MDN Web Docs
The transform CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual ...
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