MyBB Community Forums

Full Version: What is this "&"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
When going through my templates, i see & stuck in their all the time.
It's not needed.. so i remove it. Whats causing this and how do i correct it?
What plugins do you have?
Thanks, here's the list

[Image: vzww1i.jpg]

[Image: ivwpog.jpg]
& is the proper way for you to write the symbol & in HTML. Those plugins are adding those to the templates because either they need the symbol or more likely they are using a URL with a PHP parameter. You should leave them in.
Thanks Zash.. did not know this about HTML.
I have removed most of them and the board & plugins are still working fine.

Lets see what others might say about this.
Zash is correct.

Since HTML is a language with special characters such as <>" etc. to build HTML tags like <a href=""></a>, if you want those special characters to appear on the page you have to have some other way of writing them, and that's the character entity notation with &

&lt; is <
&gt; is >
&quot; is "

and because this notation makes & a special character as well, if you want & to appear on your page you have to write it as &amp;

This is also true for & in URLs, although most browsers interpret it correctly if you just write & instead of &amp; in URLs, it should still be written as &amp; anyway.

Try running the W3C HTML Validator over a page where you write just & instead of &amp; - it should complain about it being wrong.
Well, i removed them ... replaced with nothing. So why is it having no affect?
&amp; is used on links so some links should not work now
(2009-09-01, 08:09 PM)littleg Wrote: [ -> ]Well, i removed them ... replaced with nothing. So why is it having no affect?
It doesn't have an effect in your case (except it becomes invalid), but in some cases it can cause incorrect parsing.
ok guys, thanks for the info.
Links on the board where i removed it are still working.

Guess i am just lucky Smile
Pages: 1 2