mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 02:01:40 +09:00
Fix relative URLs in form actions and other HTML attributes
This commit is contained in:
parent
3bbb175cd1
commit
480635d131
1 changed files with 5 additions and 2 deletions
|
|
@ -204,10 +204,13 @@ class HTMLDisplayHandler
|
|||
// handles a relative path generated by using the rewrite module
|
||||
if(Context::isAllowRewrite())
|
||||
{
|
||||
$pattern = '/src=("|\'){1}(?:\.\/)?((?:files\/(?:attach|cache|faceOff|member_extra_info|thumbnails)|addons|common|(?:m\.)?layouts|modules|widgets|widgetstyle)\/[^"\']+)("|\'){1}/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';
|
||||
$output = preg_replace($pattern, 'src=$1' . \RX_BASEURL . '$2$3', $output);
|
||||
|
||||
$pattern = '/href=("|\'){1}(\?[^"\']+)/s';
|
||||
$pattern = '/href=(["\'])(\?[^"\']+)/s';
|
||||
$output = preg_replace($pattern, 'href=$1' . \RX_BASEURL . '$2', $output);
|
||||
|
||||
if(Context::get('vid'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue