none
BUG: HTML Rendering inconsistency RRS feed

  • Question

  • In the editor, a paragraph break following an Ordered List or Unordered List is automatically rendered.

    In the actual post display, that paragraph break is not automatically rendered, and requires an explicit paragraph to be inserted following the list, which then renders as two paragraph breaks in the editor.

    The behavior is not consistent between the editor and the actual display. I've not actually researched what the HTML specification requires for actual rendering following the declared list, but I suspect the editor's behavior is the one that is incorrect since it is doing something that's not explicitly declared in the actual HTML code.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence R Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.


    Friday, November 1, 2013 3:22 PM

Answers

  • I think I confirmed the issue. In my test Wiki I added a sentence at the bottom, then an unordered list, then another sentence (I started the sentence as another item in the list, then clicked the "Insert unordered list" button again to terminate the list and make the sentence follow the list). In the HTML I saw that a blank paragraph had been inserted, with the tags <p></p>, between the list and my final sentence. In the editor it looked like there were two blank lines between the end of the list and my final sentence. However, when I saved, the page rendered differently. There seemed to be only one blank line between the unordered list and the final sentence. Does this agree with what you experience?

    However, when I checked again in the editor, the only real change from before was that a space had been inserted in the blank paragraph, so that it appeared as <p>&nbsp;</p>. Nothing else in the HMTL had changed. This is consistent with my theory that there are two files associated with every Wiki article, one that is rendered in our browsers when we view the article, and another that we view and modify in the editor. Every time we click Save, code runs to convert the file we edited into the file that gets viewed. This is the only way I can explain why what we view in the editor does not match what we view in the article. For example, when you save an article using IE, any colors specified in the HTML as RGB values are lost. But when you edit the article, you still see the colors (and the HTML is unchanged), even though the colors don't appear in the actual article.

    I also think the code that runs when we save an article varies in different browsers. The color issue I described is different if you save the article in Firefox. The only explanation is that the code that converts the edit file into the view file is different.

    This also explains why the History tab seems to show the tags getting reordered every time we edit, even if the tags are not touched. The code that converts the edit file into the view file alphabetizes the tags before creating the view file, but fails to update the edit file (so the process must be repeated at every save).


    Richard Mueller - MVP Directory Services

    Friday, November 1, 2013 4:28 PM

All replies

  • Does this agree with what you experience?

    Yes.

    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence R Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    Saturday, November 2, 2013 5:50 PM
  • I also think the code that runs when we save an article varies in different browsers.

    I also agree with this. I see completely different "HTML Editor" issues when I use Chrome than when I use IE9. With Chrome, there's a nasty habit of inserting span tags with alternate font sizes.

    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence R Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    Saturday, November 2, 2013 5:52 PM
  • I think I confirmed the issue. In my test Wiki I added a sentence at the bottom, then an unordered list, then another sentence (I started the sentence as another item in the list, then clicked the "Insert unordered list" button again to terminate the list and make the sentence follow the list). In the HTML I saw that a blank paragraph had been inserted, with the tags <p></p>, between the list and my final sentence. In the editor it looked like there were two blank lines between the end of the list and my final sentence. However, when I saved, the page rendered differently. There seemed to be only one blank line between the unordered list and the final sentence. Does this agree with what you experience?

    However, when I checked again in the editor, the only real change from before was that a space had been inserted in the blank paragraph, so that it appeared as <p>&nbsp;</p>. Nothing else in the HMTL had changed. This is consistent with my theory that there are two files associated with every Wiki article, one that is rendered in our browsers when we view the article, and another that we view and modify in the editor. Every time we click Save, code runs to convert the file we edited into the file that gets viewed. This is the only way I can explain why what we view in the editor does not match what we view in the article. For example, when you save an article using IE, any colors specified in the HTML as RGB values are lost. But when you edit the article, you still see the colors (and the HTML is unchanged), even though the colors don't appear in the actual article.

    I also think the code that runs when we save an article varies in different browsers. The color issue I described is different if you save the article in Firefox. The only explanation is that the code that converts the edit file into the view file is different.

    This also explains why the History tab seems to show the tags getting reordered every time we edit, even if the tags are not touched. The code that converts the edit file into the view file alphabetizes the tags before creating the view file, but fails to update the edit file (so the process must be repeated at every save).


    Richard Mueller - MVP Directory Services

    Do you think this is a new bug?

    Thanks!


    Ed Price, Power BI & SQL Server Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Thursday, November 14, 2013 1:08 AM