<!> comments visible in ie7

  • 1
  • Question
  • Updated 10 years ago
  • Answered
When I enter text into the text widget sometimes a comment is added:
<!--[if !supportLineBreakNewLine]-->
This is invisible in Firefox (like it should be) but is displayed in ie7.
w3schools.com tells us:
"A good practice is to comment the text inside the script and style elements to prevent older browsers, that do not support scripting or styles, from showing it as plain text."

However, ie7 in not usually considered an oler browser.

Should I copy the source view, edit out the comment line, and replace the text widget with an html widget, or is there another way to persuade the page to behave properly in ie7.

Steve Marsden
Photo of Steve Marsden

Steve Marsden

  • 2 Posts
  • 0 Reply Likes
  • perplexed

Posted 10 years ago

  • 1
Photo of Marije

Marije, Official Rep

  • 4636 Posts
  • 237 Reply Likes
Hi Steve,

I'm sorry to hear you're seeing this. Could you let us know which style or template you are using? Are you typing the text straight in or copying and pasting it from another source?

Photo of Monique

Monique, VP of Customer Support

  • 6294 Posts
  • 446 Reply Likes
Hi Steve

Those strings do tend to cause trouble in IE. I usually edit them out exactly as you describe. You can try using the HTML widget, but if they still show up or break your page then I suggest deleting them.

If anyone knows of a workaround I am not aware of I would be happy to hear about it.

Photo of Steve Marsden

Steve Marsden

  • 2 Posts
  • 0 Reply Likes
Marije, Monique -- thanks for your replies.

I am using template Truly Simple.

Only some of the pages have this comment line.

Pages in which the comment line appears includes pages that were typed and pages that were pasted. Perhaps the comment line might have been generated during editing after the text was entered.

Is there anything I can do to avoid generating these comment lines while working with text widgets?

This would not be a problem if ie was compliant.

Thanks again for your help.

Steve Marsden