Fix relative path in "poster" attribute not being converted correctly

This commit is contained in:
Kijin Sung 2024-01-16 21:35:09 +09:00
parent e44f5ef434
commit a0af57139e

View file

@ -261,7 +261,7 @@ class HTMLDisplayHandler
$pattern = '/(action)=(["\'])(["\'])/s';
$output = preg_replace($pattern, '$1=$2' . \RX_BASEURL . '$3', $output);
$pattern = '/(action|src|href)=(["\'])\.\/([^"\']*)(["\'])/s';
$pattern = '/(action|poster|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';