phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
& in hyperlinks not validating, replaced by "&a

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite  » Advanced mod Rewrite
::  
Author Message
securitynut



Joined: 17 Jun 2007
Posts: 9

& in hyperlinks not validating, replaced by "&aPosted: Sun Jul 01, 2007 11:54 am    Post subject: & in hyperlinks not validating, replaced by "&a

Hello,

Hyperlinks that contain & characters (to seperate variables, such as links to "next newest topic" and "next oldest topic") should actually be written as & to conform to W3C validator standards (XHTML).

In the PHP files, they are indeed written as &, but the Advanced rewrite mod actually converts that to just '&' which does not validate.

Could anyone offer up a solution to this? I appreciate any help. It is important to me that my website can validate! Twisted Evil
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14854

& in hyperlinks not validating, replaced by "&aPosted: Sun Jul 01, 2007 12:01 pm    Post subject: Re: & in hyperlinks not validating, replaced by "&a

The reason why I crunched all & top & is that many mods are not using the append_sid function properly.

Many mods do mix & and & when building urls.

Anyway, in phpbb_seo_class.php, you find this commented line :

Code:
         //$this->url = (!$non_html_amp) ? str_replace('&', '&', $this->url) : $this->url;

uncomment it, and replace the three occurrences of :
Code:
         return $url;

In the url_rewrite() method's code with :
Code:
         return (!$non_html_amp) ? str_replace('&', '&', $url) : $url;


should not break (JS for example) proper calls to append_sid(), eg using the $non_html_amp var properly when needed.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
securitynut



Joined: 17 Jun 2007
Posts: 9

& in hyperlinks not validating, replaced by "&aPosted: Sun Jul 01, 2007 12:24 pm    Post subject: Re: & in hyperlinks not validating, replaced by "&a

dcz wrote:
The reason why I crunched all & top & is that many mods are not using the append_sid function properly.

Many mods do mix & and & when building urls.


Understood, thank you. It works perfectly Very Happy
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite  » Advanced mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: