Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

/me misbehaviour

edited June 2006 in Vanilla 1.0 Help
/me found some bug while posting a URL in "Text" mode: ( literally the link should point to media.html on ) 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! ;)


  • Options
    edited August 2005
    now here's the fix i made for version 0.9.2a:
    --- 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
  • Options
    thanks for that. just updated, and works a treat. Have you filled this as a bug in the wiki. If not, you may want to do so. Post the patch as well.
  • Options
    Thanks for your suggestion - I'll do that right now! ;)
  • Options
  • Options
    blizeHblizeH ✭✭
    edited June 2006
    Do you have to enable / me or does it do it automatically? /me tests
  • Options
    You'll have to enable the "Extended Text Formatter" extension
  • Options
    blizeHblizeH ✭✭
    Oops, thank you!
This discussion has been closed.