developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 9 years ago

Closed 9 years ago

#768 closed bug (fixed)

$this->addLink() produce an invalid XHTML

Reported by: foxmask Owned by: laurentj
Priority: low Milestone: Jelix 1.0.8
Component: jelix:core response Version: trunk
Severity: minor Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

in myHhtmlResponse.php i use :

    protected function doAfterActions() {
        // add RSS Feeds to the head of the page
        $this->addLink(jUrl::get('downloads~feeds:lastest'),
                       'alternate',
                       'application/rss+xml',
                       jLocale::get('downloads~common.lastest.downloads')
                      );
}

and the output is :

 <link rel="alternate" type="application/rss+xml" href="/index.php?module=downloads&action=feeds:lastest" title = "Derniers Téléchargements"/>

but it should be

 <link rel="alternate" type="application/rss+xml" href="/index.php?module=downloads&amp;action=feeds:lastest" title = "Derniers Téléchargements"/>

So actually we have warning on the HTML validation :

unescaped & or unkonwn entity &action 

Change History (4)

comment:1 Changed 9 years ago by laurentj

  • Milestone set to Jelix 1.1.2
  • Type changed from task to bug

comment:2 Changed 9 years ago by bballizlife

Well, does it really incomb to jResponseHtml to deal with this ? I think this is a developer-oriented question as you should have code like this when generating the url :

$this->addLink(jUrl::get('downloads~feeds:lastest', array(), jUrl::XMLSTRING),
                       'alternate',
                       'application/rss+xml',
                       jLocale::get('downloads~common.lastest.downloads')
                      );

comment:3 Changed 9 years ago by laurentj

@bballizlife : well, he shouldn't explicitely indicates jUrl::XMLSTRING. we have to do a htmlspecialchars on the link I think.

comment:4 Changed 9 years ago by laurentj

  • Milestone changed from Jelix 1.1.2 to Jelix 1.0.8
  • Resolution set to fixed
  • Status changed from new to closed

fixed. r1351

Note: See TracTickets for help on using tickets.