Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icon: fix ouput "raw HTML omitted" with goldmark config unsafe=false #555

Closed
postb99 opened this issue Jun 2, 2023 · 2 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@postb99
Copy link

postb99 commented Jun 2, 2023

Hi,

I updated my copy of theme to latest main and we noticed that at least since June 1 the icon shortcode is stripped. Can you explain what's wrong?

image

My article's code:

+++
title = "Photographie"
weight = 2
+++
[Photos et vidéos entre ciel et terre {{% icon icon="fa-brands fa-facebook" %}}](https://www.facebook.com/groups/216710605160181)

I tried variants such as putting icon shortcode after link, or even using html code such as

Thanks for a clue

@McShelby
Copy link
Owner

McShelby commented Jun 3, 2023

Luckily this isn't contained in an official release yet but only available in the main branch.

I am not sure if this can be fixed easily or if I revert the causing changes in #547.

For a quick fix on your side, you could add this to your config/hugo.toml:

[markup]
  [markup.goldmark.renderer]
    unsafe = true

McShelby added a commit that referenced this issue Jun 3, 2023
only keep new syntax for shortcodes in case its content may contain footnotes,
meaning block level Markdown
McShelby added a commit that referenced this issue Jun 3, 2023
@McShelby McShelby added the bug Something isn't working label Jun 3, 2023
@McShelby McShelby self-assigned this Jun 3, 2023
@McShelby McShelby added this to the 5.15.3 milestone Jun 3, 2023
@McShelby McShelby changed the title icon shortcode replaced by "raw HTML omitted" icon: fix ouput "raw HTML omitted" with goldmark config unsafe=false Jun 3, 2023
@McShelby
Copy link
Owner

McShelby commented Jun 3, 2023

I've reverted most of the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants