SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Threaded View

  1. #1
    SitePoint Enthusiast [Az]'s Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smilies being parsed in URLs

    I'm trying to modify a smilie parser to deal with smilie replacement text appearing in a URL and hence breaking the URL. I've got the following

    PHP Code:
    foreach ($this->smilieSearchArray as $key=>$value)
    {
    $parsedText preg_replace('#(?<!&amp|&quot|&lt|&gt|&copy)' preg_quote($value'#') . '#s'$this->smilieReplaceArray[$key], $text);

    This works fine if I remove $value in the preg_replace function and replace it with some hard coded text, the smilie is subsequently shown. However, using $value then the smilie text is not replaced. Both the search and replace arrays are correct as I can echo them and see that they are set up correctly

    It's probably something obvious that I'm missing but I just can't see it
    Last edited by [Az]; May 25, 2004 at 05:15.
    HEXUS Webmaster


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •