sonic-pi

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

C++

Code. Music. Live.

ERB::Util#html_escape_once

A utility method for escaping HTML without affecting existing escaped entities.

  html_escape_once('1 < 2 &amp; 3')
  # => "1 &lt; 2 &amp; 3"

  html_escape_once('&lt;&lt; Accept & Checkout')
  # => "&lt;&lt; Accept &amp; Checkout"

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_once-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_once"


# 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_once-for-pr

hub pull-request


# Celebrate!