![]() |
Is there a php or vbulletin function that will
strip any character out of a string that can't be in a url?
Amy |
html_specialcharacters? or do you want to have them really removed?
|
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 |
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 |
i thought i saw once in functions_newpost.php(3.0.x) something about sanitize url>_>
|
What about this one? urlencode() I think that puppy may do what I need.
Amy |
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 |
I ended up going with str_replace and defining the characters that I wanted stripped:
http://www.eaforums.com/forums/quiz/...AnswersFor.htm |
Quote:
|
All times are GMT. The time now is 08:15 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|