Changeset 7472893 in github for program/include/main.inc


Ignore:
Timestamp:
Dec 6, 2010 6:13:55 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
0e11940
Parents:
9e81b55
Message:
  • Fix plaintext versions of HTML messages don't contain placeholders for emotions (#1485206)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/main.inc

    raf3c045e r7472893  
    16481648 
    16491649/** 
     1650 * Replaces TinyMCE's emoticon images with plain-text representation 
     1651 * 
     1652 * @param string HTML content 
     1653 * @return string HTML content 
     1654 */ 
     1655function rcmail_replace_emoticons($html) 
     1656{ 
     1657  $emoticons = array( 
     1658    '8-)' => 'smiley-cool', 
     1659    ':-#' => 'smiley-foot-in-mouth', 
     1660    ':-*' => 'smiley-kiss', 
     1661    ':-X' => 'smiley-sealed', 
     1662    ':-P' => 'smiley-tongue-out', 
     1663    ':-@' => 'smiley-yell', 
     1664    ":'(" => 'smiley-cry', 
     1665    ':-(' => 'smiley-frown', 
     1666    ':-D' => 'smiley-laughing', 
     1667    ':-)' => 'smiley-smile', 
     1668    ':-/' => 'smiley-undecided', 
     1669    ':-X' => 'smiley-embarassed', 
     1670    '0:-)' => 'smiley-innocent', 
     1671    ':-|' => 'smiley-money-mouth', 
     1672    ':-0' => 'smiley-surprised', 
     1673    ';-)' => 'smiley-wink', 
     1674  ); 
     1675 
     1676  foreach ($emoticons as $idx => $file) { 
     1677    // <img title="Cry" src="http://.../program/js/tiny_mce/plugins/emotions/img/smiley-cry.gif" border="0" alt="Cry" /> 
     1678    $search[]  = '/<img title="[a-z ]+" src="https?:\/\/[a-z0-9_.\/-]+\/tiny_mce\/plugins\/emotions\/img\/'.$file.'.gif"[^>]+\/>/i'; 
     1679    $replace[] = $idx; 
     1680  } 
     1681 
     1682  return preg_replace($search, $replace, $html); 
     1683} 
     1684 
     1685 
     1686/** 
    16501687 * Check if working in SSL mode 
    16511688 * 
     
    18821919    } 
    18831920} 
     1921 
Note: See TracChangeset for help on using the changeset viewer.