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.

Form html entities not rendering as expected

See original GitHub issue

<input type="text" value="x&lt;y" /> <textarea>x&lt;y</textarea>

The two above standard html input or textarea render html entities values as x<y

If I data-link input or textarea then these render as x&lt;y (not expected).

val=“x&lt;y<input type="text" data-link="val" /> or <input type="text" data-link="{:val}" /> <textarea data-link="val"></textarea>

I tried using a converter using $.parseHTML()…but that returns an object which cannot be used.

Is this by design or am I simply missing something?

Is there anyway to render html entities like x<y without attaching a html editing widget (which is overkill here)?


Issue Analytics

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

github_iconTop GitHub Comments

BorisMoorecommented, May 19, 2018

The next update will include the above encode and unencode converters, to facilitate secure approaches to inserting and removing HTML data from users/the server. Marking this as feature request.

BorisMoorecommented, Sep 22, 2018

This has been fixed in release v0.9.91.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PHP htmlentities not working even with parameters
My guess is that the input data is not properly encoded as UTF-8 and the function is returning an empty string. (Assuming that...
Read more >
Certain HTML entities (e.g. shapes and arrows) not rendering ...
Actual Results: The entities are not rendered as the glyphs/symbols they represent. There's a gap where it should belong, but the symbol isn't...
Read more >
Why are special characters not rendering in emails?
Solution. Convert all special characters to HTML entities. You can use an HTML Character Converter such as provided by Email on Acid. For...
Read more >
Inserting HTML entities in a code or no format macro converts ...
Inserting HTML entities in a code or no format macro converts the characters · Issue Summary · Steps to Reproduce · Expected Results...
Read more >
HTML Entities - W3Schools
Reserved characters in HTML must be replaced with character entities. ... Disadvantage of using an entity name: Browsers may not support all entity...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found