The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need some help with code
I have set up a new profile field but it is allowing url's, etc. into that field.
I would I set it up to strip html and url's from the field? Right now I am using which doesn't do much. Code:
if($profilefieldname == "field15") { $profilefield['value'] = $strip_tags($userinfo["$profilefieldname"]); } Parker |
#2
|
|||
|
|||
Why not just use
Code:
if($userinfo['field15']) { $userinfo['field15'] = strip_tags($userinfo['field15']); } |
#3
|
|||
|
|||
Thanks.
What I am trying to do is to strip all the HTML out of that field. Like the use of http, or www, or img src, etc. I apologize if I wasn't clearer the last time. Parker |
#4
|
|||
|
|||
Techinally they aren't HTML so there is no predefined function for doing this, but you may be able to try this:
PHP Code:
|
#5
|
|||
|
|||
Try the htmlspecialchars_uni() tag
|
#6
|
||||
|
||||
PHP Code:
|
#7
|
|||
|
|||
Sorry but neither examples used strip the html or www or img, etc. from
the feild. Thanks, Parker |
#8
|
|||
|
|||
Do you mind posting the whole code? Are you using it exactly like Dismounted
|
#9
|
|||
|
|||
Sorry, I have been working the last few days.
I created a plugin that used the hook location of member_customfileds. I then put in Code:
if ($userinfo['field15']) { $userinfo['field15'] = htmlspecialchars_uni($userinfo['field15']); } When I put in data for field15 that utilizes http or www or img, etc. that code is not striped from the data so it shows up in that field. |
#10
|
||||
|
||||
htmlspecialchars_uni is not a function that strips tags.
Please give examples of input and exactly what you want to strip from that input (i.e. before and after examples). |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|