PDA

View Full Version : Parsing HTML in User Fields


tyrbo
03-03-2006, 07:15 PM
I know, I know. It's very insecure.

But still, how do I do this? I've searched and can't find out how.
Can anyone help me out?

tyrbo
03-05-2006, 09:18 AM
...bumpity bump?

Aesma Deva
03-05-2006, 10:08 AM
I've made a whacky way to parse HTML, but it works. To display a fieldX in a user's profile, you could use this in the place you want to display it, in the memberinfo template (replacing X with the number of the field):
<script type="text/javascript">
var fieldX="$userinfo[fieldX]";
fieldX=fieldX.replace(/&lt;/ig,"<");
fieldX=fieldX.replace(/&gt;/ig,">");
fieldX=fieldX.replace(/&quot;/ig,'"');
fieldX=fieldX.replace(/&amp;/ig,"&");
document.write(fieldX);
</script>

tyrbo
03-05-2006, 09:44 PM
Strange.. I do that, but then that field just doesn't display at all.
It's left completely empty.
Just blank.

If I switch back, voila! The field displays again.

lancxeon
03-06-2006, 10:04 PM
im bumping this...

cause yea that dont work =p