Adium

Changeset 24412

Show
Ignore:
Timestamp:
07/17/2008 06:47:04 PM (6 months ago)
Author:
evands
Message:

Made support for HTML filters (including the /me replacement) part of style version 4. Fixes #10102

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m

    r24071 r24412  
    152152                 *                              the same as appendMessage() and appendNextMessage() in Versions 1 and 2 but without scrolling. 
    153153                 * Version 4: Template.html now includes replaceLastMessage() 
     154                 *            Template.html now defines actionMessageUserName and actionMessageBody for display of /me (actions). 
     155                 *                               If the style provides a custom Template.html, these classes must be defined. 
     156                 *                               CSS can be used to customize the appearance of actions. 
     157                 *                        HTML filters in are now supported in Adium's content filter system; filters can assume Version 4 or later. 
    154158                 */ 
    155159                styleVersion = [[styleBundle objectForInfoDictionaryKey:KEY_WEBKIT_VERSION] intValue]; 
     
    637641                                                                                        allowJavascriptURLs:NO]; 
    638642         
    639         htmlEncodedMessage = [[adium contentController] filterHTMLString:htmlEncodedMessage 
    640                                                                                                                   direction:[content isOutgoing] ? AIFilterOutgoing : AIFilterIncoming 
    641                                                                                                                          content:content]; 
    642                  
    643                  
     643        if (styleVersion >= 4) 
     644                htmlEncodedMessage = [[adium contentController] filterHTMLString:htmlEncodedMessage 
     645                                                                                                                           direction:[content isOutgoing] ? AIFilterOutgoing : AIFilterIncoming 
     646                                                                                                                                content:content]; 
     647 
    644648        //date 
    645649        if ([content respondsToSelector:@selector(date)])