You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The substr() method has the probability of "breaking" HTML entities passed into the method if the input string is longer than the $length param. It seems there's 3 potential solutions:
Always strip HTML entities then return the $length string.
Strip HTML first if the rendered string is longer than $length, otherwise return HTML string.
Use DOMElement object and sequentially cycle through the childNodes and add them to the returned string if the "length" of the rendered string is <= $length. Otherwise truncate the string at the end of the previous childNode. The string returned may end up shorter than the requested $length but at least it would render correctly.
This is also a potential issue in XOOPS 2.5.x XoopsLocalAbstract::substr() method.
The text was updated successfully, but these errors were encountered:
Enhancement
The substr() method has the probability of "breaking" HTML entities passed into the method if the input string is longer than the $length param. It seems there's 3 potential solutions:
This is also a potential issue in XOOPS 2.5.x XoopsLocalAbstract::substr() method.
The text was updated successfully, but these errors were encountered: