Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Site Bugs / Suggestions
  4. HTML comments in article source code are rendered

HTML comments in article source code are rendered

Scheduled Pinned Locked Moved Site Bugs / Suggestions
helphtmltoolsquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sergey Alexandrovich Kryukov
    wrote on last edited by
    #1

    Let's say, in article submission wizard, we have some comment text in HTML (entered or pasted in "source" mode): <!-- some comment inside --> When article is submitted, it is rendered exactly as it is shown above. I understand that this is "not a bug, a feature", but rendering of comments is really hard to expect. It's pretty natural to have comments in original HTML, never rendered on the page. And I do understand that raw HTML code should be modified by the submission process: script and other unsafe elements needs to be eliminated, syntax coloring inside pre, etc., but… comments… After all, this is a "source" mode. Could we have an "as is" mode which does all such modifications but leaves safe and correct HTML syntax intact? I'm reporting this issue not as a bug and not as a suggestion, just want to bring this issue to attention. Thank you.

    —SA

    Sergey A Kryukov

    C 1 Reply Last reply
    0
    • S Sergey Alexandrovich Kryukov

      Let's say, in article submission wizard, we have some comment text in HTML (entered or pasted in "source" mode): <!-- some comment inside --> When article is submitted, it is rendered exactly as it is shown above. I understand that this is "not a bug, a feature", but rendering of comments is really hard to expect. It's pretty natural to have comments in original HTML, never rendered on the page. And I do understand that raw HTML code should be modified by the submission process: script and other unsafe elements needs to be eliminated, syntax coloring inside pre, etc., but… comments… After all, this is a "source" mode. Could we have an "as is" mode which does all such modifications but leaves safe and correct HTML syntax intact? I'm reporting this issue not as a bug and not as a suggestion, just want to bring this issue to attention. Thank you.

      —SA

      Sergey A Kryukov

      C Offline
      C Offline
      Chris Maunder
      wrote on last edited by
      #2

      We actually spent a fair bit of energy debating whether to strip or HTML encode comments. Unfortunately, possibly because there was beer involved, I've forgotten the salient points. Maybe we just strip out comments, eh?

      cheers Chris Maunder

      S 1 Reply Last reply
      0
      • C Chris Maunder

        We actually spent a fair bit of energy debating whether to strip or HTML encode comments. Unfortunately, possibly because there was beer involved, I've forgotten the salient points. Maybe we just strip out comments, eh?

        cheers Chris Maunder

        S Offline
        S Offline
        Sergey Alexandrovich Kryukov
        wrote on last edited by
        #3

        Sure, stripping them out would be much better. Keeping and not rendering them would be even better, but it's not really important, because who would want to seriously rely on them? For one thing, it's hard to imagine a crazy writer who will store a lot of information in comments if they are preserved. From the other hand, if they are not preserved, who would regret about them? As to rendering them… HTML comment rendering would be needed only for people writing on HTML, but what value can we expect from an author having problems rendering HTML comments in HTML without your help? :-) Thank you.

        —SA

        Sergey A Kryukov

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups