mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Normalize links href to Dolibarr internal naming
This commit is contained in:
parent
32e8bab20d
commit
17c210ca98
|
|
@ -527,6 +527,11 @@ if ($action == 'addcontainer')
|
|||
|
||||
getAllImages($object, $objectpage, $urltograb, $tmp, $action, 1, $grabimages, $grabimagesinto);
|
||||
|
||||
// Normalize links href to Dolibarr internal naming
|
||||
$tmp = preg_replace('/a href="\/([^\/"]+)\/([^\/"]+)"/', 'a href="/\1-\2.php"', $tmp);
|
||||
$tmp = preg_replace('/a href="\/([^\/"]+)\/([^\/"]+)\/([^\/"]+)"/', 'a href="/\1-\2-\3.php"', $tmp);
|
||||
$tmp = preg_replace('/a href="\/([^\/"]+)\/([^\/"]+)\/([^\/"]+)\/([^\/"]+)"/', 'a href="/\1-\2-\3-\4.php"', $tmp);
|
||||
|
||||
//print dol_escape_htmltag($tmp);exit;
|
||||
$objectpage->content = $tmp;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user