Skip to content
This repository has been archived by the owner on Dec 5, 2017. It is now read-only.

Commit

Permalink
Merge pull request #32 from vytsci/patch-1
Browse files Browse the repository at this point in the history
Making Percent-encoding supportable
  • Loading branch information
lsmith77 authored Oct 24, 2016
2 parents 536dd00 + d21b420 commit a8cbdaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Extension/UrlAutoConverterTwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function getFilters()
*/
public function autoConvertUrls($string)
{
$pattern = '/(href="|src=")?([-a-zA-Zа-яёА-ЯЁ0-9@:%_\+.~#?&\/\/=]{2,256}\.[a-zа-яё]{2,4}\b(\/?[-\p{L}0-9@:%_\+.~#?&\/\/=\(\),]*)?)/u';
$pattern = '/(href="|src=")?([-a-zA-Zа-яёА-ЯЁ0-9@:%_\+.~#?&\*\/\/=]{2,256}\.[a-zа-яё]{2,4}\b(\/?[-\p{L}0-9@:%_\+.~#?&\*\/\/=\(\),;]*)?)/u';
$stringFiltered = preg_replace_callback($pattern, array($this, 'callbackReplace'), $string);

return $stringFiltered;
Expand Down

0 comments on commit a8cbdaf

Please sign in to comment.