Turns out that FireFox doesn’t use innerText at all. Apparently the proper DOM property to use is textContent. textContent does basically the same thing as innerText.
A not so pretty solution to this issue is to check at the start of the script whether the browser supports innerText or textContent. I found a few resources that allowed me to copy and paste a few lines to make everything work.
This one which I found on coderlab is a little bulky but it gets the job done. It checks which property is available and then forces the programmer to check that flag every time he wants to use the property.
var hasInnerText =
!= undefined) ? true : false;
var elem = document.getElementById('id');
elem.textContent = value;
elem.innerText = value;
This is the method I actually used. I just or’d the two different properties together and it seemed to work. I guess one will always be undefined.
var message = elem.innerText || elem.textContent || "";
The most popular way to do this is to use a combination of gzinflate, base64_decodes, eval, and str_rot13. For most users this is really difficult to decode to figure out what is really going on. I wrote this function to hopefully make peoples lives easier (or harder, depending on who you are).
Usually the obfuscated code is written in the wordpress add-on like this :
$coded_string = "eval(gzinflate(base64_decode('FZfFDs..sdff/7nr/8B')));"
If your string looks like that then the function that follows should take decode it and return the html code pretty easily.
$contents=preg_replace("/<\?|\?>/", "", $coded_string);
eval(preg_replace("/eval/", "\$coded_string=", $coded_string));
This function is pretty straight forward but if anyone has any troubles then leave a comment or send me an email at firstname.lastname@example.org