I created a web page in ASP.NET 4.0.
I'm using MarkdownDeep library (http://www.toptensoftware.com/markdowndeep/) to convert some text to HTML.
I found an issue that I can't fix. I hope you can help me.
I have some kind of forum, a want to post some code into the comment and see the indentation.
In the markdown preview editor, the text looks good. I save the textarea content to a database I show in the page, and I looks good.
For example, I try show two element tags of html to see the indentation on the code.
If I see the code with Chrome Development Tools, I look this:
<pre><code><head>
<title>
</code></pre>
It shows like this:
Everything is fine. But, if I reload the page, it appears like this
<pre><code><head><title>
</code></pre>
And it shows like this:
What I'm doing is:
- write some text in the textarea
- save text to the database
- bring text back from database
- converting markdown to html with the Transform() method of MarkdownDeep
- put the result to the a Label's Text property
I tried, converting markdown before saving to the database, but nothing changes.
Ok, I finally found the solution.
That code was in a page that have a masterpage. If I took away the masterpage, everything is fine. I don't know why... but that issue dissapear.