Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Bug-reports    Topic: [solved] Article title with quotes breaks W3C on RSS link
Pages: [1]   Go Down
  Print  
Author Topic: [solved] Article title with quotes breaks W3C on RSS link  (Read 2237 times)
0 Members and 1 Guest are viewing this topic.
OpenGlobal
Newbie
*

Karma: 0
Offline Offline

Posts: 2


« on: January 18, 2011, 01:28:48 »

If an article has quotes in the title it breaks the RSS link in the head, and hence, breaks W3C too.

It creates a link like:

<link href="/component/jcomments/feed/com_content/95.html" rel="alternate" type="application/rss+xml" title="Article "title" with quotes">

which should be:

<link href="/component/jcomments/feed/com_content/95.html" rel="alternate" type="application/rss+xml" title="Article &#34;title&#34; with quotes">

Cheers

MattLG
  
« Last Edit: February 28, 2012, 17:49:58 by smart » Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: January 18, 2011, 01:59:26 »

Ok, thanks. This issue would be fixed in upcoming version. As quick solution you have to open /components/com_jcomments/jcomments.php and replace code:

Code: (php)
$attribs = array('type' => 'application/rss+xml', 'title' => strip_tags($object_title));
with
Code: (php)
$attribs = array('type' => 'application/rss+xml', 'title' => htmlspecialchars(strip_tags($object_title), ENT_COMPAT, 'UTF-8'));

and (for Joomla 1.0 users)
Code: (php)
$html = '<link rel="alternate" type="application/rss+xml" title="' . strip_tags($object_title) . '" href="' . $link . '" />';
with
Code: (php)
$html = '<link rel="alternate" type="application/rss+xml" title="' . htmlspecialchars(strip_tags($object_title)) . '" href="' . $link . '" />';
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Bug-reports    Topic: [solved] Article title with quotes breaks W3C on RSS link
 
Jump to: