Reputation: 1474
I extracted some text from an Excel file and stored it in a DB. After that, I fetch this text from the DB and display it on a page.
Below is how the problem looks like on the page:
And this is a screenshot of how it appears in the source code:
How can I format this paragraph to show in page correctly ?
Upvotes: 0
Views: 1095
Reputation: 2643
Take a look at HTML Purifier. Pretty good at cleaning up dirty input. http://htmlpurifier.org/
Upvotes: 0
Reputation: 2474
Just try this
<div name="description" ....>
<pre>
.....
here your content
.....
</pre>
</div>
if not work let me know
Upvotes: 1