plugin crops string from links which starts with string “on”
-
plugin crops string from links in
<a>
which starts with string “on”.
Issue is caused by thestrip_event_attributes()
function in the plugin please update the regex to exclude the “on” insidehref
attribute
$regex = '#\bon\w+\b(\s*=\s*[\'"][^\'"]*[\'"])?(?=[^<]*>)#msi'
which cause this issue.
Updated regex :
#\b\son\w+\b(\s*=\s*[\'"][^\'"]*[\'"])?(?=[^<]*>)#msi
This regex will do the job
Example:
Real content:
<a href="https://help.one.com/hc/en-us/articles/360000692109-How-do-I-make-a-link-in-Website-Builder" >test string</a>
Displayed as:
<a href="https://help..com/hc/en-us/articles/360000692109-How-do-I-make-a-link-in-Website-Builder" >test string</a>
The string one got cropped and this result in 404 error while clicking the link
- The topic ‘plugin crops string from links which starts with string “on”’ is closed to new replies.