Fix forms with empty actions

This commit is contained in:
Kijin Sung 2020-06-20 15:50:22 +09:00
parent 3a13b51068
commit e9bec851f9

View file

@ -204,7 +204,7 @@ class HTMLDisplayHandler
// handles a relative path generated by using the rewrite module
if(Context::isAllowRewrite())
{
$pattern = '/(action|src|href)=(["\'])\.\/([^"\']*)(["\'])/s';
$pattern = '/(action|src|href)=(["\'])(?:\.\/([^"\']*))?(["\'])/s';
$output = preg_replace($pattern, '$1=$2' . \RX_BASEURL . '$3$4', $output);
$pattern = '/src=(["\'])((?:files\/(?:attach|cache|faceOff|member_extra_info|thumbnails)|addons|common|(?:m\.)?layouts|modules|widgets|widgetstyle)\/[^"\']+)(["\'])/s';