Skip to content

Commit 246b71a

Browse files
dingo-djrfnl
andauthored
Update wordpress-coding-standards/php.md
Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com>
1 parent 69a81e6 commit 246b71a

File tree

1 file changed

+1
-1
lines changed
  • wordpress-coding-standards

1 file changed

+1
-1
lines changed

wordpress-coding-standards/php.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Use single and double quotes when appropriate. If you're not evaluating anything
1616

1717
```php
1818
echo '<a href="/static/link" class="button button-primary">Link name</a>';
19-
echo "<a href='$escaped_link'>text with a ' single quote</a>";
19+
echo "<a href='{$escaped_link}'>text with a ' single quote</a>";
2020
```
2121

2222
Text that goes into HTML or XML attributes should be escaped so that single or double quotes do not end the attribute value and invalidate the HTML, causing a security issue. See [Data Validation](https://developer.wordpress.org/plugins/security/data-validation/) in the Plugin Handbook for further details.

0 commit comments

Comments
 (0)