diff --git a/build/runtest/env.js b/build/runtest/env.js
index e15284293..f3afb1959 100644
--- a/build/runtest/env.js
+++ b/build/runtest/env.js
@@ -86,13 +86,15 @@ var window = this;
DOMDocument.prototype = {
createTextNode: function(text){
- return makeNode( this._dom.createTextNode(text) );
+ return makeNode( this._dom.createTextNode(
+ text.replace(/&/g, "&").replace(//g, ">")) );
},
createElement: function(name){
- return makeNode( this._dom.createElement(name) );
+ return makeNode( this._dom.createElement(name.toLowerCase()) );
},
getElementsByTagName: function(name){
- return new DOMNodeList( this._dom.getElementsByTagName(name) );
+ return new DOMNodeList( this._dom.getElementsByTagName(
+ name.toLowerCase()) );
},
getElementById: function(id){
var elems = this._dom.getElementsByTagName("*");
@@ -221,7 +223,10 @@ var window = this;
window.DOMElement = function(elem){
this._dom = elem;
- this.style = {};
+ this.style = {
+ get opacity(){ return this._opacity; },
+ set opacity(val){ this._opacity = val + ""; }
+ };
// Load CSS info
var styles = (this.getAttribute("style") || "").split(/\s*;\s*/);
@@ -271,6 +276,10 @@ var window = this;
return this.childNodes.valueOf();
},
set innerHTML(html){
+ html = html.replace(/<\/?([A-Z]+)/g, function(m){
+ return m.toLowerCase();
+ });
+
var nodes = this.ownerDocument.importNode(
new DOMDocument( new java.io.ByteArrayInputStream(
(new java.lang.String("