Sha256: aac68fc9088720ed43147a244ff70e68983430b43e5d45b2c6c454672a9ea76a

Contents?: true

Size: 810 Bytes

Versions: 6

Compression:

Stored size: 810 Bytes

Contents

<h1>Testing HTML Sanitizer</h1>

<p>Read more here <a href="https://github.com/rails/rails-html-sanitizer">rails-html-sanitizer</a></p>

<textarea rows="4" cols="200">
full_sanitizer = Rails::Html::FullSanitizer.new
full_sanitizer.sanitize("<b>Bold</b> no more!  <a href='more.html'>See more here</a>...")
</textarea>

<hr>
<%=
  Rails::Html::FullSanitizer
    .new
    .sanitize("<b>Bold</b> no more!  <a href='more.html'>See more here</a>...")
%>

<br/><br/><br/>

<hr>

<textarea rows="4" cols="200">
link_sanitizer = Rails::Html::LinkSanitizer.new
link_sanitizer.sanitize('<a href="example.com">Only the link text will be kept.</a>')
# => Only the link text will be kept.
</textarea>

<%=
  Rails::Html::LinkSanitizer
    .new
    .sanitize('<a href="example.com">Only the link text will be kept.</a>')
%>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rails_app_generator-0.1.14 after_templates/addons/rails_html_sanitizer_xxx/home/index.html.erb
rails_app_generator-0.1.13 after_templates/addons/rails_html_sanitizer_xxx/home/index.html.erb
rails_app_generator-0.1.12 after_templates/addons/rails_html_sanitizer_xxx/home/index.html.erb
rails_app_generator-0.1.11 after_templates/addons/rails_html_sanitizer_xxx/home/index.html.erb
rails_app_generator-0.1.10 after_templates/addons/rails_html_sanitizer/index.html.erb
rails_app_generator-0.1.9 after_templates/addons/rails_html_sanitizer/index.html.erb