December 2023
Intermediate to advanced
242 pages
5h 28m
English
| Recipe 73 | Converting Plain Text into HTML-Ready Markup |
Imagine you intend to display the text entered by users on a web page. A frustrating aspect of web programming is the lack of compatibility between HTML and plain text, despite their frequent interchangeable use. While people may enter information in plain text format in the text areas of forms, it’s likely that you’d want to display the same information in HTML format. To illustrate, consider this example, where a user has entered a question on a forum page:
| | Hey guys, |
| | |
| | I need your help with something urgent. My cat, Mr. Whiskers, has been acting |
| | super weird lately. He won't stop meowing, he keeps knocking down my plants, |
| | and to top it off, he's been stealing my socks. |
| | |
| | Do you ... |
Read now
Unlock full access