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.

Leading and tailing spaces and ampersands displayed as html code on send

See original GitHub issue

Hey @supersnager.

Noticed another thing, where leading and tailing spaces displayed as html code &nbps; They are fine if between words

Leading space =>  Leading space

Ampersands (&) are sent as html code to, no matter where they present in the text.

Tom & Jerry => Tom & Jerry

Space & Ampersand =>  Space & Ampersand 

Same as for < and > and perhaps the rest of HTML Enteties

Both render alright, but when you log the input value, you see code, and that gets sent to server. updated sandbox

Thank you!

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
supersnagercommented, Sep 23, 2021

@chloe-schoreisz Sure! Will do.

1reaction
chloe-schoreiszcommented, Sep 23, 2021

Just found out about this ! Could it be added to the doc ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use ampersands in HTML: to encode or not to encode?
In HTML, the ampersand character (“&”) declares the beginning of an entity reference (a special character). If you want one to appear in...
Read more >
&nbsp and HTML Space Challenges and Tricks | Mailtrap Blog
To make it clear to each browser what it should render, we use HTML entities, and we wrap them in an ampersand (&)...
Read more >
Do I really need to encode '&' as '&amp;'? - Stack Overflow
Yes. Just as the error said, in HTML, attributes are #PCDATA meaning they're parsed. This means you can use character entities in the...
Read more >
How whitespace is handled by HTML, CSS, and in the DOM
Whitespace is any string of text composed only of spaces, tabs or line breaks (to be precise, CRLF sequences, carriage returns or line...
Read more >
HTML Ampersand Code
An ampersand (sometimes referred to as the "and" symbol) is a special character that requires special coding when being used on a website...
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