Skip to content

Commit 4e11881

Browse files
committed
Apply suggestions from code review and makes a few additional improvements
1 parent d3983c4 commit 4e11881

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

WordPress/Docs/PHP/PregQuoteDelimiterStandard.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
>
66
<standard>
77
<![CDATA[
8-
Passing the $delimiter parameter to preg_quote() is strongly recommended. If it is not passed, the default delimiters `/` are presumed, which is often wrong.
8+
Passing the $delimiter parameter to preg_quote() is strongly recommended to ensure the delimiter used in the regex is properly escaped.
99
]]>
1010
</standard>
1111
<code_comparison>
12-
<code title="Valid: The delimiter is included.">
12+
<code title="Valid: The delimiter parameter is passed.">
1313
<![CDATA[
14-
preg_quote( $dir, '#' )
14+
preg_quote( $dir, <em>'/'</em> );
1515
]]>
1616
</code>
17-
<code title="Invalid: The delimiter is not included.">
17+
<code title="Invalid: The delimiter parameter is missing.">
1818
<![CDATA[
19-
preg_quote( $dir );
19+
preg_quote( $dir<em></em> );
2020
]]>
2121
</code>
2222
</code_comparison>
23-
</documentation>
23+
</documentation>

0 commit comments

Comments
 (0)