# Hugo 0.60.0 Raw HTML omitted Issue

**URL:** <https://discourse.gohugo.io/t/hugo-0-60-0-raw-html-omitted-issue/22010>\
**Category:** support\
**Created:** [November 27, 2019, 12:04pm UTC](https://discourse.gohugo.io/t/hugo-0-60-0-raw-html-omitted-issue/22010 "2019-11-27T12:04:39Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Griffin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jonathan_griffin/32/8355_2.png) [@Jonathan\_Griffin](https://discourse.gohugo.io/u/Jonathan_Griffin)\
**Post date:** [November 27, 2019, 12:04pm UTC](https://discourse.gohugo.io/t/hugo-0-60-0-raw-html-omitted-issue/22010/1 "2019-11-27T12:04:40Z")

</div>

I’ve just upgraded to 0.60.0 and have a problem.

I have a shortcode that is simply a wrapper for tables.

`<div class="table wide">{{- .Inner | markdownify -}}</div>`

For standard markdown tables everything works fine. However, when I use a HTML table nothing appears. Instead in the html source I see:

> Raw HTML omitted

Is there something I have overlooked?

---

<div class="post-metadata">

**Author:** ![Guite](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/guite/32/6980_2.png) [@Guite](https://discourse.gohugo.io/u/Guite)\
**Post date:** [November 27, 2019, 12:07pm UTC](https://discourse.gohugo.io/t/hugo-0-60-0-raw-html-omitted-issue/22010/2 "2019-11-27T12:07:16Z")

</div>

Same question. A workaround seems to enable the unsafe mode:

```auto
markup:
  goldmark:
    renderer:
      unsafe: true

```

But this would be required for quite many sites, wouldn’t it?

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [November 27, 2019, 12:10pm UTC](https://discourse.gohugo.io/t/hugo-0-60-0-raw-html-omitted-issue/22010/3 "2019-11-27T12:10:28Z")

</div>

> [@Guite](#):
>
> But this would be required for quite many sites, wouldn’t it?

Probably.

> [@Jonathan\_Griffin](#):
>
> Is there something I have overlooked?

So, you can set `unsafe: true`. But you can also use the `{{<` delimiter when including the shortcode in the page. This may or may not be what you want.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Griffin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jonathan_griffin/32/8355_2.png) [@Jonathan\_Griffin](https://discourse.gohugo.io/u/Jonathan_Griffin)\
**Post date:** [November 27, 2019, 12:16pm UTC](https://discourse.gohugo.io/t/hugo-0-60-0-raw-html-omitted-issue/22010/4 "2019-11-27T12:16:50Z")

</div>

That helps alot. Thanks Bep and Guite.

---

<div class="post-metadata">

**Author:** ![Guite](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/guite/32/6980_2.png) [@Guite](https://discourse.gohugo.io/u/Guite)\
**Post date:** [November 27, 2019, 12:16pm UTC](https://discourse.gohugo.io/t/hugo-0-60-0-raw-html-omitted-issue/22010/5 "2019-11-27T12:16:54Z")

</div>

> [@bep](#):
>
> But you can also use the `{{<` delimiter when including the shortcode in the page. This may or may not be what you want.

This looks promising for me 🙂  
Example:

```auto
{{< bsrow >}}
{{% bsgrid class="col-md-7" %}}
Some markdown
{{% /bsgrid %}}
{{% bsgrid class="col-md-5 sidebar" %}}
Some markdown
{{% /bsgrid %}}
{{< /bsrow >}}

```

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [November 27, 2019, 12:18pm UTC](https://discourse.gohugo.io/t/hugo-0-60-0-raw-html-omitted-issue/22010/6 "2019-11-27T12:18:59Z")

</div>

> [@Guite](#):
>
> But this would be required for quite many sites, wouldn’t it?

I have considered the default settings carefully. Mostly to match Blackfriday’s, but setting `unsafe: true` is something each user have to decide.

Also, I have an open issue about adding Bluemonday – which is a better HTML sanitizer.

Also note that if you own/control the content, setting `unsafe: true` is perfectly safe.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [November 27, 2019, 12:21pm UTC](https://discourse.gohugo.io/t/hugo-0-60-0-raw-html-omitted-issue/22010/7 "2019-11-27T12:21:29Z")

</div>

> [@Guite](#):
>
> This looks promising for me

But note that the caveat is that the rendered shortcode will not be part of the “outer rendering” (so to speak), which is not optimal if they contain headings/footnotes that needs to be in the ToC etc.

---

<div class="post-metadata">

**Author:** ![jamesb93](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jamesb93/32/9709_2.png) [@jamesb93](https://discourse.gohugo.io/u/jamesb93)\
**Post date:** [December 1, 2019, 10:06pm UTC](https://discourse.gohugo.io/t/hugo-0-60-0-raw-html-omitted-issue/22010/8 "2019-12-01T22:06:24Z")

</div>

I’m not sure what the solution here is? I am already using the delimiter in the markdown file but still get the omission issue. What are you suggesting to do?

---

<div class="post-metadata">

**Author:** ![lando](https://avatars.discourse-cdn.com/v4/letter/l/ccd318/32.png) [@lando](https://discourse.gohugo.io/u/lando)\
**Post date:** [December 17, 2019, 7:32am UTC](https://discourse.gohugo.io/t/hugo-0-60-0-raw-html-omitted-issue/22010/9 "2019-12-17T07:32:17Z")

</div>

Thanks Guite.

For config.toml use this  
[markup.goldmark.renderer]  
unsafe = true

---

<div class="post-metadata">

**Author:** ![hollowaykeanho](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hollowaykeanho/32/22239_2.png) [@hollowaykeanho](https://discourse.gohugo.io/u/hollowaykeanho)\
**Post date:** [December 19, 2019, 9:26am UTC](https://discourse.gohugo.io/t/hugo-0-60-0-raw-html-omitted-issue/22010/10 "2019-12-19T09:26:19Z")

</div>

Is it possible to support multiple `layouts` directory like how `static` works? I like the `unsafe = false` direction but there are situations where I want certain partials to be privatized.

Disclaimer: I’m maintaining a Hugo Theme which has its own Hugo site generator hosting the page. Things like Paypal button broke but can be solved nicely using partials and short-code.

---

<div class="post-metadata">

**Author:** ![gauntface](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/gauntface/32/12355_2.png) [@gauntface](https://discourse.gohugo.io/u/gauntface)\
**Post date:** [January 22, 2020, 5:55am UTC](https://discourse.gohugo.io/t/hugo-0-60-0-raw-html-omitted-issue/22010/11 "2020-01-22T05:55:16Z")

</div>

Just in case anyone find this post like me looking for a way to add HTML to their markdown page, I ended up doing the following…

Create a custom shortcode called something like raw-html.html with the contents:

```auto
{{ .Inner }}

```

Then wrap your HTML in your content like so:

```auto
{{< raw-html >}}
<video width="480" height="480" autoplay muted loop playsinline>
  <source src="https://i.giphy.com/media/687qS11pXwjCM/giphy.mp4" type="video/mp4" />
  Your browser does not support the video tag.
</video>
{{< / raw-html >}}

```

Not saying this is a good idea or solution, but it seems to work.

---

<div class="post-metadata">

**Author:** ![romanitalian](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/romanitalian/32/10969_2.png) [@romanitalian](https://discourse.gohugo.io/u/romanitalian)\
**Post date:** [April 5, 2020, 7:37am UTC](https://discourse.gohugo.io/t/hugo-0-60-0-raw-html-omitted-issue/22010/12 "2020-04-05T07:37:24Z")

</div>

I am using this one in my config file (`src/config.toml`):

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

```

And it works!

Documentation about this “feature” ( **issue** ):

> **[Configure Markup](https://gohugo.io/getting-started/configuration-markup/#configure-markup)**
>
> How to handle Markdown and other markup related configuration.

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [April 6, 2020, 3:00pm UTC](https://discourse.gohugo.io/t/hugo-0-60-0-raw-html-omitted-issue/22010/13 "2020-04-06T15:00:12Z")

</div>

This topic was automatically closed after 31 hours. New replies are no longer allowed.
