• Aaghosh TK

    (@aaghosh)


    plugin crops string from links in <a> which starts with string “on”.
    Issue is caused by the strip_event_attributes() function in the plugin please update the regex to exclude the “on” inside href 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

    • This topic was modified 2 years ago by Aaghosh TK.
    • This topic was modified 2 years ago by Aaghosh TK.
    • This topic was modified 2 years ago by Aaghosh TK.
    • This topic was modified 2 years ago by Aaghosh TK.
    • This topic was modified 2 years ago by Aaghosh TK.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘plugin crops string from links which starts with string “on”’ is closed to new replies.