Skip to content

Commit 7d8abc9

Browse files
committed
ProxifyPlugin: do not proxify src= when it is empty
1 parent b0a31d5 commit 7d8abc9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Plugin/ProxifyPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public function onCompleted(ProxyEvent $event){
152152

153153
// html .*? just in case href is empty...
154154
$str = preg_replace_callback('@href\s*=\s*(["\'])(.*?)\1@im', array($this, 'html_href'), $str);
155-
$str = preg_replace_callback('@src\s*=\s*(["|\'])(.+?)\1@i', array($this, 'html_src'), $str);
155+
$str = preg_replace_callback('@src\s*=\s*(["|\'])([^\'"]+)\1@i', array($this, 'html_src'), $str);
156156

157157
// sometimes form action is empty - which means a postback to the current page
158158
$str = preg_replace_callback('@<form[^>]*action=(["\'])(.*?)\1[^>]*>@i', array($this, 'form_action'), $str);

0 commit comments

Comments
 (0)