The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
strip any character out of a string that can't be in a url?
Amy |
#2
|
|||
|
|||
![]()
html_specialcharacters? or do you want to have them really removed?
|
#3
|
||||
|
||||
![]()
I think she means strip any character of a string that would cause it to be invalid URL, i'd personally just bash the string against a function to check the string is a valid URL in the first place.
- Zero Tolerance |
#4
|
||||
|
||||
![]()
What I'm trying to do is remove spaces and punctuation and anything goofy from a string that would make it mess up a url if I were to put the string in a url.
I know I can use eregi, but figured there might be a standard function designed for this. For example, given "Amy's Wonderful Userpage Hack", it would return, AmysWonderfulUserpageHack no apostrophes and no spaces. Amy |
#5
|
||||
|
||||
![]()
i thought i saw once in functions_newpost.php(3.0.x) something about sanitize url>_>
|
#6
|
||||
|
||||
![]()
What about this one? urlencode() I think that puppy may do what I need.
Amy |
#7
|
||||
|
||||
![]()
I'm going to look at sanitize url and see if it's any better. I'm not crazy about the looks of this:
http://www.eaforums.com/forums/quiz/...ce+Artists.htm |
#8
|
||||
|
||||
![]()
I ended up going with str_replace and defining the characters that I wanted stripped:
http://www.eaforums.com/forums/quiz/...AnswersFor.htm |
#9
|
||||
|
||||
![]() Quote:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|