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
Renamed option headings and references to use 'set' prefix (e.g., 'setStrict', 'setWhitespaceTextNode') for consistency with method naming conventions. Improves clarity for users configuring parser options.
https: //github.com/paquettg/pull/253
Co-Authored-By: Pete Medina <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,51 +139,51 @@ $dom->loadFromUrl('http://gmail.com'); // will not have whitespaceTextNode set t
139
139
140
140
At the moment we support 12 options.
141
141
142
-
**Strict**
142
+
**setStrict**
143
143
144
-
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.).
144
+
`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.).
145
145
146
-
**whitespaceTextNode**
146
+
**setWhitespaceTextNode**
147
147
148
-
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.
148
+
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.
149
149
150
-
**enforceEncoding**
150
+
**setEnforceEncoding**
151
151
152
-
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.
152
+
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.
153
153
154
-
**cleanupInput**
154
+
**setCleanupInput**
155
155
156
-
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`.
156
+
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`.
157
157
158
-
**removeScripts**
158
+
**setRemoveScripts**
159
159
160
-
Set this to `false` to skip removing the script tags from the document body. This might have adverse effects. Defaults to `true`.
160
+
Set `setRemoveScripts` to `false` to skip removing the script tags from the document body. This might have adverse effects. Defaults to `true`.
161
161
162
-
**removeStyles**
162
+
**setRemoveStyles**
163
163
164
-
Set this to `false` to skip removing of style tags from the document body. This might have adverse effects. Defaults to `true`.
164
+
Set `setRemoveStyles` to `false` to skip removing of style tags from the document body. This might have adverse effects. Defaults to `true`.
165
165
166
-
**preserveLineBreaks**
166
+
**setPreserveLineBreaks**
167
167
168
-
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`.
168
+
`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`.
169
169
170
-
**removeDoubleSpace**
170
+
**setRemoveDoubleSpace**
171
171
172
-
Set this to `false` if you want to preserve whitespace inside of text nodes. It is set to `true` by default.
172
+
Set `setRemoveDoubleSpace` to `false` if you want to preserve whitespace inside of text nodes. It is set to `true` by default.
173
173
174
-
**removeSmartyScripts**
174
+
**setRemoveSmartyScripts**
175
175
176
-
Set this to `false` if you want to preserve smarty script found in the html content. It is set to `true` by default.
176
+
Set `setRemoveSmartyScripts` to `false` if you want to preserve smarty script found in the html content. It is set to `true` by default.
177
177
178
-
**htmlSpecialCharsDecode**
178
+
**setHtmlSpecialCharsDecode**
179
179
180
-
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.
180
+
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.
181
181
182
-
**selfClosing**
182
+
**setSelfClosing**
183
183
184
184
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.
185
185
186
-
**noSlash**
186
+
**setNoSlash**
187
187
188
188
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