The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
& into & in thread title
When we create a thread in vbulletin with a title like "google & yahoo", it automatically converts into "google & yahoo" as viewed in source.
This saves one 1 xhtml error. How do we do it? Thank you |
#2
|
|||
|
|||
Do you have html enabled in your title field?? Not 100% sure but it looks like this kind of problem
if not its probably when you Imported some data, have you imported anything lately or converted from one other forum to VBulletin?? |
#3
|
||||
|
||||
Quote:
I just want to know, how & is converted to & automatically in thread titles in vb so that I can do the same in my custom script otherwise it gives xhtml error if & is not escaped. |
#4
|
|||
|
|||
Quote:
Sorry buddy i thought you had a problem with & replacing & in your forum titles, Now you've explained it a bit better i'll see if i can find out for you |
#5
|
||||
|
||||
Quote:
btw, i think i found the solution. Can anybody confirm if vbulletin uses the same? http://www.w3schools.com/PHP/func_st...ecialchars.asp Thanks |
#6
|
|||
|
|||
Yes vBulletin will also use htmlspecialchars() or htmlspecialchars_uni() .
|
#7
|
||||
|
||||
Quote:
Btw, I just figured this out and achieved this by using vBulletin input cleaner. I think vb does it like this. I had the title variable in my script as 'title' => TYPE_STR I changed it to 'title' => TYPE_NOHTML. This takes care of all those characters being escaped. |
#8
|
||||
|
||||
TYPE_NOHTML will run the checks as in TYPE_STR, as well as running htmlspecialchars_uni() on the string.
BTW, htmlspecialchars_uni() is not a default PHP function, it is created by vBulletin. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|