/me misbehaviour
/me found some bug while posting a URL in "Text" mode:
http://inter.net/media.html
( literally the link should point to media.html on http://inter.net/ )
vanilla replaces / me inside the link with my name (which is wrong) and then wraps html tags around the URL (which is correct).
hold on for the fix! ;)
0
This discussion has been closed.
Comments
--- library/Utility.StringManipulator.class.php_orig +++ library/Utility.StringManipulator.class.php @@ -52,7 +52,7 @@ if ($FormatPurpose == agFORMATSTRINGFORDISPLAY) { $sReturn = htmlspecialchars($sReturn); $sReturn = str_replace("\r\n", "<br />", $sReturn); - $sReturn = str_replace("/me", $this->GetAccountLink($Object), $sReturn); + $sReturn = preg_replace('/(?!\w)(?<!\w)\/me/', $this->GetAccountLink($Object), $sReturn); $sReturn = $this->AutoLink($sReturn); } else { // You'd think I should be formatting the string for safe database