We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This issue is related to #6622
Since 00954c5 was merged:
The following under /layouts/_default/_markup/render-link.html:
/layouts/_default/_markup/render-link.html
<a href="{{ .Destination | safeURL }}"{{ with .Title}}title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a>
And [Hello<br> Goodbye](/somewhere/) in a content file
[Hello<br> Goodbye](/somewhere/)
Will be rendered as: <a href="/somewhere/">Hello<br> Goodbye</a>
<a href="/somewhere/">Hello<br> Goodbye</a>
But the above is currently not possible for image render hooks:
For example:
With the following template code under /layouts/_default/_markup/render-image.html:
/layouts/_default/_markup/render-image.html
<figure><img class="someClass" src="{{ .Destination }}" alt="{{ .PlainText }}"/><figcaption>{{ .Text | safeHTML }}</figcaption></figure>
And the following markdown in a content file: ![Hello<br> Goodbye](image.jpg)
![Hello<br> Goodbye](image.jpg)
Will be rendered as:
<figure><img class="someClass" src="image.jpg" alt="Hello Goodbye"/><figcaption>Hello Goodbye</figcaption></figure>
i.e. The HTML <br> tag is ignored.
<br>
Please consider adding this functionality.
The text was updated successfully, but these errors were encountered:
Preserve HTML Text for image render hooks
f8003af
Fixes gohugoio#6639
a67d95f
Fixes #6639
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
This issue is related to #6622
Since 00954c5 was merged:
The following under
/layouts/_default/_markup/render-link.html
:And
[Hello<br> Goodbye](/somewhere/)
in a content fileWill be rendered as:
<a href="/somewhere/">Hello<br> Goodbye</a>
But the above is currently not possible for image render hooks:
For example:
With the following template code under
/layouts/_default/_markup/render-image.html
:And the following markdown in a content file:
![Hello<br> Goodbye](image.jpg)
Will be rendered as:
i.e. The HTML
<br>
tag is ignored.Please consider adding this functionality.
The text was updated successfully, but these errors were encountered: