@@ -141,7 +141,7 @@ This is SSL URL:
141
141
Email url has no scheme, we use anoter method to convert them, and it will add ` mailto: ` at begin of ` href ` .
142
142
143
143
``` php
144
- $text = $aurolink ->convertEmail($text);
144
+ $text = $autolink ->convertEmail($text);
145
145
```
146
146
147
147
Output
@@ -153,7 +153,7 @@ Output
153
153
154
154
## Attributes Escaping
155
155
156
- As ` htmlspecialchars() ` in PHP 8.1 or higher will escape single quote as default,
156
+ As ` htmlspecialchars() ` in PHP 8.1 or higher will escape single quote as default,
157
157
Autolink will also escape single quote even in 8.0. Use this method to keep all escape
158
158
behavior same at any PHP versions:
159
159
@@ -174,7 +174,7 @@ $autolink->setEscapeHandler(fn => ...);
174
174
We can set this option by constructor or setter:
175
175
176
176
``` php
177
- $auitolink ->textLimit(50);
177
+ $autolink ->textLimit(50);
178
178
179
179
$text = $autolink->convert($text);
180
180
```
@@ -188,15 +188,15 @@ http://campus.asukademy.com/learning/job/84-fin...
188
188
Use Your own limit handler by set a callback:
189
189
190
190
``` php
191
- $auitolink ->textLimit(function($url) {
191
+ $autolink ->textLimit(function($url) {
192
192
return substr($url, 0, 50) . '...';
193
193
});
194
194
```
195
195
196
196
Or use ` \Asika\Autolink\LinkHelper::shorten() ` Pretty handler:
197
197
198
198
``` php
199
- $auitolink ->textLimit(function($url) {
199
+ $autolink ->textLimit(function($url) {
200
200
return \Asika\Autolink\Autolink::shortenUrl($url, 15, 6);
201
201
});
202
202
```
@@ -228,7 +228,7 @@ Output:
228
228
Strip Scheme on link text:
229
229
230
230
``` php
231
- $auitolink ->stripScheme(true);
231
+ $autolink ->stripScheme(true);
232
232
233
233
$text = $autolink->convert($text);
234
234
```
@@ -244,11 +244,11 @@ Output
244
244
Auto escape URL, default is ` true ` :
245
245
246
246
``` php
247
- $auitolink ->autoEscape(false);
247
+ $autolink ->autoEscape(false);
248
248
249
249
$text = $autolink->convert($text);
250
250
251
- $auitolink ->autoEscape(true);
251
+ $autolink ->autoEscape(true);
252
252
253
253
$text = $autolink->convert($text);
254
254
```
@@ -266,7 +266,7 @@ Convert URL which no scheme. If you pass `TRUE` to this option, Autolink will us
266
266
` http ` as default scheme, you can also provide your own default scheme.
267
267
268
268
``` php
269
- $auitolink ->linkNoScheme('https');
269
+ $autolink ->linkNoScheme('https');
270
270
271
271
$text = $autolink->convert('www.google.com.tw');
272
272
```
0 commit comments