# Semicolon in shortcode parameter

**URL:** https://discourse.gohugo.io/t/semicolon-in-shortcode-parameter/19910
**Category:** support
**Created:** [July 30, 2019, 5:57pm UTC](https://discourse.gohugo.io/t/semicolon-in-shortcode-parameter/19910 "2019-07-30T17:57:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mnz](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@mnz](https://discourse.gohugo.io/u/mnz)
#### Post date: [July 30, 2019, 5:57pm UTC](https://discourse.gohugo.io/t/semicolon-in-shortcode-parameter/19910/1 "2019-07-30T17:57:24Z")

</div>

Hello,  
I hope this isn’t too simple a question. When trying to make a shortcode in hugo, I’ve discovered a strange behaviour with a semicolon in parameter values.

Specifically, I’m trying to allow some custom css styling for a shortcode element.

Here is an example of what such a shortcode might look like:  
{{ .Get “cell-style” }}  
\<div style="{{ .Get “cell-style” }}"\>  
test  
\</div\>

And how it would be used:  
`{{< test cell-style="border:1px solid black" >}}`

This would render predictably, a div with a border.  
But if I add a semicolon like this:  
`{{< test cell-style="border:1px solid black;" >}}`

The first line would show as expected: border:1px solid black;  
But the style in the div turns to gibberish: style=“ZgotmplZ”

What am I doing wrong here, and is this the entirely wrong thing to do?

(The semicolon would be needed for multiple styles)

---

<div class="post-metadata">

### Author: ![mnz](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@mnz](https://discourse.gohugo.io/u/mnz)
#### Post date: [July 30, 2019, 6:02pm UTC](https://discourse.gohugo.io/t/semicolon-in-shortcode-parameter/19910/2 "2019-07-30T18:02:31Z")

</div>

Ah, found it 😐

Piping to safeCSS allows the semicolon  
`<div style="{{ .Get "cell-style" | safeCSS}}">`

---

<div class="post-metadata">

### Author: ![davidsneighbour](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/davidsneighbour/32/24507_2.png) [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)
#### Post date: [July 31, 2019, 5:59am UTC](https://discourse.gohugo.io/t/semicolon-in-shortcode-parameter/19910/3 "2019-07-31T05:59:43Z")

</div>

🙂 next time google the gibberish - that could help more often than you think. That’s a default (but weird) error code that exactly predicted your solution 🙂

> <https://stackoverflow.com/questions/14765395/why-am-i-seeing-zgotmplz-in-my-go-html-template-output>

There are many useful `safeSOMETHING` functions in Hugo.
