Changeset 3706

Show
Ignore:
Timestamp:
07/09/07 22:14:32 (1 year ago)
Author:
timothy
Message:

Allow angle brackets and HTML to be entered on the iPhone.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Plug-Ins/Web Interface/Resources/iphone/iphone.js

    r3703 r3706  
    1414{ 
    1515    return this.className.indexOf(className) !== -1; 
     16} 
     17 
     18String.prototype.escapeHTML = function() 
     19{ 
     20    return this.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"); 
    1621} 
    1722 
     
    516521 
    517522DirectChatPanel.prototype.send = function() { 
    518         this.sendMessage(this.panelInputElement.value); 
     523        this.sendMessage(this.panelInputElement.value.escapeHTML()); 
    519524 
    520525        this.panelInputElement.focus();