Volledige versie bekijken : Prototype voor html replace
ScriptSuite
%Europe/Berlin %894 %2005, 22:28
<font face='Arial'><b>NIEUWS</b></font>
==>
<font face='Arial'><b>NIEUWS</b></font>
Is er een standaard functie voor deze omzetting binnen flash?
Bij voorbaat dank.
Roenes
%Europe/Berlin %899 %2005, 22:34
escape en unescape dacht ik :)
Dit is trouwens gewoon te vinden in de help van flash hoor :)
raidho
%Europe/Berlin %953 %2005, 23:52
zoiets zal t doen:
String.prototype.htmlEncode = function() {
s = this;
a = s.split("&"); s = a.join("&");
a = s.split("'"); s = a.join("'");
a = s.split(" "); s = a.join(" ");
a = s.split("<"); s = a.join("<");
a = s.split(">"); s = a.join(">");
a = s.split('"'); s = a.join(""");
return s;
}
String.prototype.htmlUnencode = function() {
s = this;
a = s.split("&"); s = a.join("&");
a = s.split("'"); s = a.join("'");
a = s.split(" "); s = a.join(" ");
a = s.split("<"); s = a.join("<");
a = s.split(">"); s = a.join(">");
a = s.split("""); s = a.join('"');
return s;
}
str = "<font face='Arial'><b>NIEUWS</b></font>"
trace (str.htmlEncode())
str2 = "<font face='Arial'><b>NIEUWS</b></font>"
trace (str2.htmlUnencode())
mateo)
%Europe/Berlin %967 %2005, 00:12
ik weet niet wat je van plan bent, maar als je deze string van buiten flash inlaadt en toewijst aan een html tekstveld, hoef je niks te converteren.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.