When you install a new copy of Joomla on your server, you may experience strange coding issues like the snapshot to the right. The text for the title of the anchor contains a \ slash in it. When you inspect the code for the link it looks similar to the following:
<a href="/help/\"http:/google.com\"" target="\"_blank\"" title="\"Google.com\"">Sed tincidunt convallis dolor at luctus.</a>
The correct code should look like the following code.
<a href="http://google.com" target="_blank" title="Google.com">Sed tincidunt convallis dolor at luctus.</a>
This cannot be fixed in the Joomla editor. To fix this, a system setting will need to be changed.
What causes the slashes to be added?
This is caused by having magic_quotes_gpc turned on in your php.ini. The magic_quotes_gpc will add slashes to quotes when saving your articles. To fix this you will need to disable magic_quotes_gpc. You can do this by following the steps below.
Turning magic_quotes_gpc off
- Log into your cPanel.
- Go to the File manager. Select the public_html directory and click Go.
- Edit your php.ini file.
Note! If you do not have a php.ini, our tech support can restore it to your public_html.
- Find the line in your php.ini that says magic_quotes_gpc.
magic_quotes_gpc = On
Change the Value to Off.
magic_quotes_gpc = Off
It should look like the snapshot to the right.
Save the changes.
- Finally, make sure your php.ini file is recursive. Now when you hover over the link your will see the \ slashes gone.