Skip to content

Commit 7474c6a

Browse files
committed
Prepare for 2.0.4 release.
1 parent a7dca95 commit 7474c6a

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,22 @@ Output
139139

140140
```
141141

142+
## Attributes Escaping
143+
144+
As `htmlspecialchars()` in PHP 8.1 or higher will escape single quote as default,
145+
Autolink will also escape single quote even in 8.0. Use this method to keep all escape
146+
behavior same at any PHP versions:
147+
148+
```php
149+
$autolink->escape('...');
150+
```
151+
152+
If you want to change the escape behavior, set your custom escape handler:
153+
154+
```php
155+
$autolink->setEscapeHandler(fn => ...);
156+
```
157+
142158
## Options
143159

144160
### `text_limit`

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.3
1+
2.0.4

0 commit comments

Comments
 (0)