HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/gems/default/doc/rails-html-sanitizer-1.4.2/ri/Rails/Html/cdesc-Html.ri
U:RDoc::NormalModule[iI"	Html:ETI"Rails::Html;T0o:RDoc::Markup::Document:@parts[	o;;[:
@fileI" lib/rails-html-sanitizer.rb;T:0@omit_headings_from_table_of_contents_below0o;;[;	I" lib/rails/html/sanitizer.rb;T;
0o;;[;	I"(lib/rails/html/sanitizer/version.rb;T;
0o;;[;	I" lib/rails/html/scrubbers.rb;T;
0;	0;
0[[U:RDoc::Constant[iI"XPATHS_TO_REMOVE;TI""Rails::Html::XPATHS_TO_REMOVE;T:public0o;;[;	@;
0@@cRDoc::NormalModule0U;[iI"WhiteListSanitizer;TI"$Rails::Html::WhiteListSanitizer;T;I"#Rails::Html::SafeListSanitizer;To;;[S:RDoc::Markup::Heading:
leveli:	textI"#Rails::Html::SafeListSanitizer;To:RDoc::Markup::Paragraph;[I"PSanitizes html and css from an extensive safe list (see link further down).;To:RDoc::Markup::BlankLineS;
;i;I"Whitespace;To;;[	I"KWe can't make any guarantees about whitespace being kept or stripped. ;TI"ILoofah uses Nokogiri, which wraps either a C or Java parser for the ;TI"%respective Ruby implementation. ;TI"FThose two parsers determine how whitespace is ultimately handled.;T@,o;;[	I"LWhen the stripped markup will be rendered the users browser won't take ;TI"Nwhitespace into account anyway. It might be better to suggest your users ;TI"Hwrap their whitespace sensitive content in pre tags or that you do ;TI"so automatically.;T@,S;
;i;I"Options;To;;[I"@Sanitizes both html and css via the safe lists found here: ;TI"Shttps://github.com/flavorjones/loofah/blob/master/lib/loofah/html5/safelist.rb;T@,o;;[
I"9SafeListSanitizer also accepts options to configure ;TI".the safe list used when sanitizing html. ;TI"#There's a class level option: ;TI"CRails::Html::SafeListSanitizer.allowed_tags = %w(table tr td) ;TI"KRails::Html::SafeListSanitizer.allowed_attributes = %w(id class style);T@,o;;[I";Tags and attributes can also be passed to +sanitize+. ;TI"APassed options take precedence over the class level options.;T@,S;
;i;I"
Examples;To;;[I"=safe_list_sanitizer = Rails::Html::SafeListSanitizer.new;T@,o;;[I"'Sanitize css doesn't take options ;TI"@safe_list_sanitizer.sanitize_css('background-color: #000;');T@,o;;[I"EDefault: sanitize via a extensive safe list of allowed elements ;TI"0safe_list_sanitizer.sanitize(@article.body);T@,o;;[I"4Safe list via the supplied tags and attributes ;TI"Hsafe_list_sanitizer.sanitize(@article.body, tags: %w(table tr td), ;TI"$attributes: %w(id class style));T@,o;;[I"%Safe list via a custom scrubber ;TI"Osafe_list_sanitizer.sanitize(@article.body, scrubber: ArticleScrubber.new);T;	@;
0@@@0[[[I"
class;T[[;[[:protected[[:private[[I"
instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;	0;
0[	@
@@@I"
Rails;T@