mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
mangle @ in blockquote cite attribute
This commit is contained in:
parent
1d374636d4
commit
502a00e17f
@ -114,6 +114,7 @@ class egw_htmLawed
|
||||
* function to provide individual checks for element attribute pairs
|
||||
* implemented so far: img checking for alt attribute == image; set this to empty
|
||||
* a checking for title, replacing @
|
||||
* blockquote checking for cite, replacing @
|
||||
*/
|
||||
function hl_my_tag_transform($element, $attribute_array=0)
|
||||
{
|
||||
@ -134,6 +135,13 @@ function hl_my_tag_transform($element, $attribute_array=0)
|
||||
{
|
||||
if (strpos($attribute_array['title'],'@')!==false) $attribute_array['title']=str_replace('@','(at)',$attribute_array['title']);
|
||||
}
|
||||
if ($element == 'blockquote')
|
||||
{
|
||||
if (isset($attribute_array['cite']))
|
||||
{
|
||||
if (strpos($attribute_array['cite'],'@')!==false) $attribute_array['cite']=str_replace('@','(at)',$attribute_array['cite']);
|
||||
}
|
||||
}
|
||||
/*
|
||||
// Elements other than 'span' or 'span' without a 'style' attribute are returned unchanged
|
||||
if($element == 'span' && isset($attribute_array['style']))
|
||||
@ -183,6 +191,7 @@ function hl_my_tag_transform($element, $attribute_array=0)
|
||||
* -control for/on external Images and src-length
|
||||
* a -checking for title and href, replacing @ accordingly
|
||||
* -navigate to local anchors without reloading the page
|
||||
* blockquote -checking for cite, replacing @
|
||||
*/
|
||||
function hl_email_tag_transform($element, $attribute_array=0)
|
||||
{
|
||||
@ -222,6 +231,13 @@ function hl_email_tag_transform($element, $attribute_array=0)
|
||||
{
|
||||
if (strpos($attribute_array['title'],'@')!==false) $attribute_array['title']=str_replace('@','(at)',$attribute_array['title']);
|
||||
}
|
||||
if ($element == 'blockquote')
|
||||
{
|
||||
if (isset($attribute_array['cite']))
|
||||
{
|
||||
if (strpos($attribute_array['cite'],'@')!==false) $attribute_array['cite']=str_replace('@','(at)',$attribute_array['cite']);
|
||||
}
|
||||
}
|
||||
if($element == 'a')
|
||||
{
|
||||
if (isset($attribute_array['name']) && isset($attribute_array['id'])) $attribute_array['id'] = $attribute_array['name'];
|
||||
|
Loading…
Reference in New Issue
Block a user