How to Disable SafeCSS Goldmark?

how to disable SafeCSS requirement for Goldmark rendering especially for supporting inline CSS embedding? I tried so many ways including and not limited to:

[markup.goldmark.renderer]
unsafe = true # Allow HTML in md files

Reason: to support AMP CSS rendering for a theme module. The current safety mechanism completely destroyed a lot of critical selectors such as:

+ ~ > < 

There is no other way aside downgrading the theme designs to simplest possible selectors. Also, those selectors are not prohibited (https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/style_pages/).

Used hugo version: Hugo Static Site Generator v0.73.0-428907CC/extended linux/amd64 BuildDate: 2020-06-23T16:40:09Z.

Thanks in adv.

Nevermind. I believe what Goldmark did is necessary evil since:

  1. SafeCSS is essential to avoid a list of web security vulnerabilities.

If we want to proceed, this issue should be filed against the browser for failing to parse safeCSS correctly. Test browsers are Chrome and Firefox.

At this point, your only choice is to keep the CSS back to basic.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.