You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-22
Original file line number
Diff line number
Diff line change
@@ -150,51 +150,51 @@ $dom->loadFromUrl('http://gmail.com'); // will not have whitespaceTextNode set t
150
150
151
151
At the moment we support 12 options.
152
152
153
-
**Strict**
153
+
**setStrict**
154
154
155
-
Strict, by default false, will throw a `StrickException` if it find that the html is not strictly compliant (all tags must have a closing tag, no attribute with out a value, etc.).
155
+
`setStrict`, by default `false`, will throw a `StrickException` if it find that the html is not strictly compliant (all tags must have a closing tag, no attribute with out a value, etc.).
156
156
157
-
**whitespaceTextNode**
157
+
**setWhitespaceTextNode**
158
158
159
-
The whitespaceTextNode, by default true, option tells the parser to save textnodes even if the content of the node is empty (only whitespace). Setting it to false will ignore all whitespace only text node found in the document.
159
+
The `setWhitespaceTextNode`, by default `true`, option tells the parser to save textnodes even if the content of the node is empty (only whitespace). Setting it to `false` will ignore all whitespace only text node found in the document.
160
160
161
-
**enforceEncoding**
161
+
**setEnforceEncoding**
162
162
163
-
The enforceEncoding, by default null, option will enforce an character set to be used for reading the content and returning the content in that encoding. Setting it to null will trigger an attempt to figure out the encoding from within the content of the string given instead.
163
+
The `setEnforceEncoding`, by default `null`, option will enforce an character set to be used for reading the content and returning the content in that encoding. Setting it to `null` will trigger an attempt to figure out the encoding from within the content of the string given instead.
164
164
165
-
**cleanupInput**
165
+
**setCleanupInput**
166
166
167
-
Set this to `false` to skip the entire clean up phase of the parser. If this is set to true the next 3 options will be ignored. Defaults to `true`.
167
+
Set `setCleanupInput` to `false` to skip the entire clean up phase of the parser. If this is set to true the next 3 options will be ignored. Defaults to `true`.
168
168
169
-
**removeScripts**
169
+
**setRemoveScripts**
170
170
171
-
Set this to `false` to skip removing the script tags from the document body. This might have adverse effects. Defaults to `true`.
171
+
Set `setRemoveScripts` to `false` to skip removing the script tags from the document body. This might have adverse effects. Defaults to `true`.
172
172
173
-
**removeStyles**
173
+
**setRemoveStyles**
174
174
175
-
Set this to `false` to skip removing of style tags from the document body. This might have adverse effects. Defaults to `true`.
175
+
Set `setRemoveStyles` to `false` to skip removing of style tags from the document body. This might have adverse effects. Defaults to `true`.
176
176
177
-
**preserveLineBreaks**
177
+
**setPreserveLineBreaks**
178
178
179
-
Preserves Line Breaks if set to `true`. If set to `false` line breaks are cleaned up as part of the input clean up process. Defaults to `false`.
179
+
`setPreserveLineBreaks` preserves line Breaks if set to `true`. If set to `false` line breaks are cleaned up as part of the input clean up process. Defaults to `false`.
180
180
181
-
**removeDoubleSpace**
181
+
**setRemoveDoubleSpace**
182
182
183
-
Set this to `false` if you want to preserve whitespace inside of text nodes. It is set to `true` by default.
183
+
Set `setRemoveDoubleSpace` to `false` if you want to preserve whitespace inside of text nodes. It is set to `true` by default.
184
184
185
-
**removeSmartyScripts**
185
+
**setRemoveSmartyScripts**
186
186
187
-
Set this to `false` if you want to preserve smarty script found in the html content. It is set to `true` by default.
187
+
Set `setRemoveSmartyScripts` to `false` if you want to preserve smarty script found in the html content. It is set to `true` by default.
188
188
189
-
**htmlSpecialCharsDecode**
189
+
**setHtmlSpecialCharsDecode**
190
190
191
-
By default this is set to `false`. Setting this to `true` will apply the php function `htmlspecialchars_decode` too all attribute values and text nodes.
191
+
By default `setHtmlSpecialCharsDecode` is set to `false`. Setting this to `true` will apply the php function `htmlspecialchars_decode` too all attribute values and text nodes.
192
192
193
-
**selfClosing**
193
+
**setSelfClosing**
194
194
195
195
This option contains an array of all self closing tags. These tags must be self closing and the parser will force them to be so if you have strict turned on. You can update this list with any additional tags that can be used as a self closing tag when using strict. You can also remove tags from this array or clear it out completly.
196
196
197
-
**noSlash**
197
+
**setNoSlash**
198
198
199
199
This option contains an array of all tags that can not be self closing. The list starts off as empty but you can add elements as you wish.
0 commit comments