Skip to content

Content dropped as "raw HTML omitted" on two pages (Goldmark unsafe: false) #23

@HeyItsGilbert

Description

@HeyItsGilbert

Reported during the link/rendering review in #19. These produce the only WARN lines in an otherwise clean hugo --gc --minify build.

Problem

With markup.goldmark.renderer.unsafe: false (set in hugo.yaml, and appropriate to keep for security), Goldmark silently drops content that looks like raw HTML. Two pages lose real content:

  1. content/podcast/2013-08-14-episode-238-powerscripting-podcast-glenn-block-jim-christopher-on-scriptcs.md
    The IRC chat log uses <nickname> angle brackets (e.g. <BellyTimber>, <MikeFRobbins>). Lines starting with these are parsed as raw HTML tags and stripped, so much of the transcript is missing from the rendered page.

  2. content/articles/2011-05-18-configuring-rbac-for-mobileshell-in-powergui-pro-3-0.md
    An embedded <?xml ?> block and HTML comments (<!-- -->) are dropped.

Suggested fix (per-page, not a global unsafe: true)

  • For the IRC transcript: escape the angle brackets (\<nick\> or &lt;/&gt;), or wrap the chat log in a fenced code block so it renders verbatim.
  • For the MobileShell article: escape the angle brackets in the <?xml?> snippet, or fence it as a code block.

Keeping unsafe: false is preferred; fix the source content rather than enabling raw HTML site-wide.

To reproduce

hugo --gc --minify   # emits "Raw HTML omitted while rendering ..." WARN for both files

Acceptance

  • Both pages render their full content with unsafe: false retained, and the build emits no raw-html warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions