mailto component adds &amp to &

Discussion regarding Joomla! 1.5 Performance issues.
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Apr 05, 2013 5:36 pm

mailto component adds &amp to &

Post by david_1 » Wed Aug 07, 2013 2:36 pm


My website title has an & character between words.
whenever I send a email through the mailto component or over the contact form I get a & instead of just "&". In the front end the website title is fine. Where do I have to look to fix this ?

User avatar
Joomla! Ace
Joomla! Ace
Posts: 1431
Joined: Mon Nov 12, 2012 10:48 pm

Re: mailto component adds &amp to &

Post by sitesrus » Wed Aug 07, 2013 5:54 pm

& gets formatted as &amp because it is a special character and it needs to be preserved,

This is necessary for example when you are using links and "mailto" links in order to preserve the symbols, properly format the output, and etc. A mailto link is a good example because you can specify subject,body, and etc but if you want to preserve special characters like white space,ampersands, and have them appear in content you have to code them like so in order for them to appear normally in the output email because those characters alone without being encoded are invalid.

Does that make sense? Within an url it would also likely be invalid because '&' signifies query strings so if I am hitting a php page and using &itemid=4&articleid=10 like joomla links it's arguments saying itemid is an argument and the value is 4, an easy way for me to parse the url and know what I am looking at/for.

Hopefully that is clear, basically these characters in some contexts are invalid, so by encoding them properly they become valid and preserved using proper codes. Otherwise they are invalid or mean something else entirely.
I like working with Joomla :)


Return to “Performance - Joomla! 1.5”