Code higlight doesn't display html properly

Dec 14, 2010 at 4:44 AM

If I put some HTML into Code highlight plugin, then save the post - all looks OK. But if I edit the post again (even if I change nothing) and save it - it will show all the HTML in a single line. It doesn't recognize <br/> (which were added by BlogEngine automatically!!!) as tags anymore, it thinks its part of the XML text to highlight...

Oh, guys it became too hard to use the product... Really not user-friendly.

Coordinator
Dec 14, 2010 at 5:27 AM

Thanks for the report.  I'm assuming you are using the BE 2.0 RC.  Quickly testing with Firefox only, I couldn't reproduce this problem with editing an existing post that contains Syntax Highlighter code, and saving it again with no edits.  When editing and saving, the code appeared the same.  Although I did notice an extra line feed was inserted before the code began.  I'll see if I can reproduce this with another browser or possibly with different code for the syntax highlighter.

Dec 14, 2010 at 3:48 PM
I'm using FF, try to insert multiline HTML. Some lines has spaces in order to keep the formatting.

On Mon, Dec 13, 2010 at 10:27 PM, BenAmada <notifications@codeplex.com> wrote:

From: BenAmada

Thanks for the report. I'm assuming you are using the BE 2.0 RC. Quickly testing with Firefox only, I couldn't reproduce this problem with editing an existing post that contains Syntax Highlighter code, and saving it again with no edits. When editing and saving, the code appeared the same. Although I did notice an extra line feed was inserted before the code began. I'll see if I can reproduce this with another browser or possibly with different code for the syntax highlighter.

Read the full discussion online.

To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)

To start a new discussion for this project, email blogengine@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Coordinator
Dec 17, 2010 at 5:44 AM

I tried a few variations, with HTML, JavaScript and C# code.  I haven't been able to reproduce a problem (I'm trying though).  I create the post, insert the code using the new Syntax Highlighter toolbar icon, save, view, edit, in some cases I make changes and in other cases I make no changes, and then re-save.  The code looks the same each time.  Here's a screenshot of what my HTML looks like after re-saving the post a few times.

Here's the HTML I'm pasting in for this particular example.

<p>This is some HTML, including <strong><span style="color: #ff0000;">rich text</span></strong>.</p>
<p>This is a paragraph break.&nbsp; With some more <span style="font-size: medium;">style</span> changes.</p>

<ul>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
</ul>

<p>Last <span style="text-decoration: underline;">paragraph</span>.</p>
Dec 19, 2010 at 8:34 AM
Edited Dec 19, 2010 at 8:52 AM

Try to insert a simple xml element (mark as xml)

<chart />

I have just tried it won't work in IE 8 or FF 3.5.11 neither locally (win xp) or at my site
Hmm neither will any html :(

Text without tags is ok, eg some c#

if (!tag)
    repsonse.write("ok")

Editing the post manually using raw html editor works nicely but opening the darn thing in the wysiwyg any xml will be deleted

Any ideas? Spam or security settings? 
Thanks in advance  /Peter

Coordinator
Dec 19, 2010 at 9:08 AM

You're right Peter ... HTML tags (the brackets in particular) are not working right.  I just replied to your thread where you brought this up.  And I just checked in BE 2.0.0.24 which fixes this problem.  In your thread, I included a link to the updated version of this code plugin ... or BE 2.0.0.24 can be downloaded to get the updated plugin.

I would not be surprised if this issue was also causing the HTML problems that podlipensky reported.