Disable shortcode auto escape html

Hello,
I am trying to get a shortcode that can render anchor tags in a way I need.
In the shortcode “link.html” I have the following:
{{ if eq (index .Params 0) "signup" }}
<а href="/manage/register" {{ if eq (index .Params 2) "nofollow" }}rel="nofollow"{{ end }} data-turbolinks="false">{{ index .Params 1 }}</а>
{{ end }}

And in the content I have:
---
title: WEB
buttons:
- text: Learn more
section: docs
classes: outlined primary
image: WEB
weight: 1
---
{{% link signup "Sign up here" nofollow %}} <br>
{{< link signup "Sign up here" nofollow >}} <br>

The problem is that none of the shortcode usage in the content produces anchor tag. Instead it escapes it and I get the literal text “<а href=”/manage/register" rel=“nofollow” data-turbolinks=“false”>Sign up here</а>" instead of anchor tag. I really cant see if Im doing something wrong, or is there any way to force it to stop it from escaping HTML injected by shortcodes.

Oh my god I am sorry. Somehow one of the A’s in the shortcode is in a different language and thats why it does not render. I havent noticed I was searching extensively the source of the problem.

2 Likes

Those sorts of problems are such a pain. I work in Japanese language and English, and sometimes a Japanese “full pitch space” will get inserted if I’m not careful, and cause that sort of problem. It’s a unicode character, which also happens to be about the same width as two normal ascii spaces, and, to add to the fun, invisible. :slight_smile:

1 Like

Exactly. Im writing in cyrillic as well as in english and “a - english” and “а - cyrillic” are the same. I slipped just one of the a-s of the anchor tag in cyrillic and Webstorm, the good guy that it is, just open and closed the tag is if everything is completely fine. Took me a good hour to realise this is not the a I am looking for.

hex editor!