• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

<textarea>& nbsp ;</textarea>

Originally posted by: aloser
& nbsp ; means "space" in html - just like "Hallo" means "Hello" in German (oder Detusch...)

Uh, no kidding.
It actually means "non-breaking space" to be exact.

Textareas, for some reason, leave all other HTML in there like < >, however any special character code will be converted to it's rendered counterpart. & gt; becomes >, & lt; becomes <, etc.
 
Alright, so the only thing I can do, is before I write the code into the text area... I've gotta modify it and chance all the stuff... great
 
Originally posted by: Modeps
Alright, so the only thing I can do, is before I write the code into the text area... I've gotta modify it and chance all the stuff... great

I'm just curious.. why are you doing this? 🙂 Are you writing some kinda tutorial?
 
Originally posted by: screw3d
Originally posted by: Modeps
Alright, so the only thing I can do, is before I write the code into the text area... I've gotta modify it and chance all the stuff... great

I'm just curious.. why are you doing this? 🙂 Are you writing some kinda tutorial?

It's for a backend interface to modify webpage code.
 
The simplest answer is always the correct one. Just before writing the code that appears inside the <textarea> tags, all I had to do was replace all the & with & amp;'s. It renders properly in the textarea, and is inputted correctly into the database.

Thanks blokes.

~M
 
Just out of curiosity, is this php?

Any time you're dealing with any web page where the user can input data you need to have escaping code handy. What if the person happened to type something like this?:

</textarea><script>window.close()</script>

I know that's a contrived example and the user would have to be malicious to do it, but take a look in Forum Issues some time and see how many people can't edit their profiles correctly. If I'm not mistaken, it's usually because they did something that screwed up a textarea on the profile page.
 
Back
Top