Convert text to UpperCase outside html tags

Hey guys!
I got this text that I want to convert to uppercase…
Easy right?

the problem is that my server is linux, and files are case sensitive…
So I need to convert the text to UpperCase, except what’s inside the html tags.

This prototype removes the HTML tags…
can someone help me convert this to, instead removing the HTML, ingore the text to become upperCase?


String.prototype.removeHTML = function(){
	var temp, i;
	var xStr = this;
	var total = xStr.length;
		for(i=0;i<total; i++){
			if( xStr.charAt(i)!="<" ){
				temp += xStr.substr(i,1);
			} else {
				var x = xStr.substr(i).indexOf(">");
				i += x;
			}
		}
	return( temp );
}