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

Enable safeHTMLAttr #2234

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@marcobeierer
Contributor

marcobeierer commented Jun 22, 2016

Hi together,

I'm using Hugo shortcodes to generate HTML forms from JSON. I like to set HTML attributes dynamically, but was not able to do so because the attributes were replaced with "ZgotmplZ". The template functions safeHTML, etc. did not work.

After some research I found the template function "safeHTMLAttr", which was already implemented, but disabled, because the developer has seen no use case for it. See #347 (comment)

I have now enabled the function again, because it would be really useful for me. If you like to merge it, I could also write a test and improve the documentation.

Best regards,
Marco

@CLAassistant

This comment has been minimized.

Show comment
Hide comment
@CLAassistant

CLAassistant Jun 22, 2016

CLA assistant check
All committers have signed the CLA.

CLAassistant commented Jun 22, 2016

CLA assistant check
All committers have signed the CLA.

@moorereason

This comment has been minimized.

Show comment
Hide comment
@moorereason

moorereason Jun 22, 2016

Contributor

I like this PR. We live in the Go Template world with it's features and quirks. We should give users the tools they need to build whatever they want.

Contributor

moorereason commented Jun 22, 2016

I like this PR. We live in the Go Template world with it's features and quirks. We should give users the tools they need to build whatever they want.

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Jun 22, 2016

Member

I like it, too.

Member

bep commented Jun 22, 2016

I like it, too.

anthonyfok added a commit that referenced this pull request Jun 27, 2016

@anthonyfok

This comment has been minimized.

Show comment
Hide comment
@anthonyfok

anthonyfok Jun 27, 2016

Contributor

Ditto. :-) Looking back at #347, it seems silly to me that I would have been so overly cautious back then. So, let's merge it! It's long overdue.

Merged as c21e2b3 after amending the commit message per the contribution guideline.
Thank you for your contribution, @webguerilla!

Contributor

anthonyfok commented Jun 27, 2016

Ditto. :-) Looking back at #347, it seems silly to me that I would have been so overly cautious back then. So, let's merge it! It's long overdue.

Merged as c21e2b3 after amending the commit message per the contribution guideline.
Thank you for your contribution, @webguerilla!

@marcobeierer

This comment has been minimized.

Show comment
Hide comment
@marcobeierer

marcobeierer Jun 27, 2016

Contributor

@anthonyfok Thank you for merging, however I have not contributed much, just uncommented your work 😃

Contributor

marcobeierer commented Jun 27, 2016

@anthonyfok Thank you for merging, however I have not contributed much, just uncommented your work 😃

@anthonyfok

This comment has been minimized.

Show comment
Hide comment
@anthonyfok

anthonyfok Jun 27, 2016

Contributor

@webguerilla Thank you for your compliments! But the credit actually goes to @tatsushid who contributed this feature in the first place.

Contributor

anthonyfok commented Jun 27, 2016

@webguerilla Thank you for your compliments! But the credit actually goes to @tatsushid who contributed this feature in the first place.

tychoish added a commit to tychoish/hugo that referenced this pull request Aug 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment