Advertisement

mailto component adds &amp to &

Discussion regarding Joomla! 1.5 Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security and Performance FAQs
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
david_1
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

hi,

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 ?

Advertisement
User avatar
sitesrus
Joomla! Ace
Joomla! Ace
Posts: 1469
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,

http://www.degraeve.com/reference/specialcharacters.php

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 :). I offer the following professional services: Custom extension development, SEO/marketing, maintenance/support, security and WCAG audits, and will work on websites at a reasonable rate.

Advertisement

Locked

Return to “Performance - Joomla! 1.5”