sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

ERB::Util.html_escape

A utility method for escaping HTML tag characters.
This method is also aliased as <tt>h</tt>.

In your ERB templates, use this method to escape any unsafe content. For example:
  <%=h @person.name %>

  puts html_escape('is a > 0 & a < 10?')
  # => is a &gt; 0 &amp; a &lt; 10?

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/core_ext/string/output_safety.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-ERB--Util-html_escape-for-pr


# Commit to git

git add app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/core_ext/string/output_safety.rbgit commit -m "better docs for ERB::Util.html_escape"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-ERB--Util-html_escape-for-pr

hub pull-request


# Celebrate!