var contentType = '[% contenttype %]';
if ( contentType == 'text/plain' )
{
- theContent = theContent.replace( /^<html><head\/><body><pre>/ , "" );
- theContent = theContent.replace( /<\/pre><\/body><\/html>$/ , "" );
+ theContent = theContent.replace( /^<html><head\/><body><pre>/i , "" );
+ theContent = theContent.replace( /<\/pre><\/body><\/html>$/i , "" );
theContent = theContent.replace( /</gi , "<" );
theContent = theContent.replace( />/gi , ">" );
theContent = theContent.replace( /&/gi , "&" );