![]() |
& 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 |
Do you have html enabled in your title field?? Not 100% sure but it looks like this kind of problem :confused:
if not its probably when you Imported some data, have you imported anything lately or converted from one other forum to VBulletin?? |
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. |
Quote:
:o 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:D |
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 |
Yes vBulletin will also use htmlspecialchars() or htmlspecialchars_uni() .
|
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. |
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. |
All times are GMT. The time now is 01:07 AM. |
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:
|