@@ -76,12 +76,12 @@ class ParseOptions
7676 #
7777 # ⚠ This option enables entity substitution, contrary to what the name implies.
7878 #
79- # ⚠ <b>It is UNSAFE to set this option</b> when parsing untrusted documents.
79+ # 🛡 <b>It is UNSAFE to set this option</b> when parsing untrusted documents.
8080 NOENT = 1 << 1
8181
8282 # Load external subsets. On by default for XSLT::Stylesheet.
8383 #
84- # ⚠ <b>It is UNSAFE to set this option</b> when parsing untrusted documents.
84+ # 🛡 <b>It is UNSAFE to set this option</b> when parsing untrusted documents.
8585 DTDLOAD = 1 << 2
8686
8787 # Default DTD attributes. On by default for XSLT::Stylesheet.
@@ -111,7 +111,7 @@ class ParseOptions
111111 # Forbid network access. On by default for XML::Document, XML::DocumentFragment,
112112 # HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema.
113113 #
114- # ⚠ <b>It is UNSAFE to unset this option</b> when parsing untrusted documents.
114+ # 🛡 <b>It is UNSAFE to unset this option</b> when parsing untrusted documents.
115115 NONET = 1 << 11
116116
117117 # Do not reuse the context dictionary. Off by default.
@@ -128,8 +128,7 @@ class ParseOptions
128128
129129 # Compact small text nodes. Off by default.
130130 #
131- # ⚠ No modification of the DOM tree is allowed after parsing. libxml2 may crash if you try to
132- # modify the tree.
131+ # ⚠ No modification of the DOM tree is allowed after parsing.
133132 COMPACT = 1 << 16
134133
135134 # Parse using XML-1.0 before update 5. Off by default
@@ -140,7 +139,7 @@ class ParseOptions
140139
141140 # Relax any hardcoded limit from the parser. Off by default.
142141 #
143- # ⚠ <b>It is UNSAFE to set this option</b> when parsing untrusted documents.
142+ # 🛡 <b>It is UNSAFE to set this option</b> when parsing untrusted documents.
144143 HUGE = 1 << 19
145144
146145 # Support line numbers up to <code>long int</code> (default is a <code>short int</code>). On
@@ -151,7 +150,12 @@ class ParseOptions
151150 # The options mask used by default for parsing XML::Document and XML::DocumentFragment
152151 DEFAULT_XML = RECOVER | NONET | BIG_LINES
153152
154- # The options mask used by default used for parsing XSLT::Stylesheet
153+ # Shorthand options mask useful for parsing XSLT stylesheets:
154+ # sets RECOVER, NONET, NOENT, DTDLOAD, DTDATTR, NOCDATA, BIG_LINES.
155+ #
156+ # 🛡 This option set includes `NOENT` and `DTDLOAD` which are unsafe for untrusted
157+ # documents. <b>Do not parse untrusted XSLT stylesheets.</b> See Nokogiri::XSLT for more
158+ # information.
155159 DEFAULT_XSLT = RECOVER | NONET | NOENT | DTDLOAD | DTDATTR | NOCDATA | BIG_LINES
156160
157161 # The options mask used by default used for parsing HTML4::Document and HTML4::DocumentFragment
0 commit comments