[Web4lib] RSS and HTML (href) links

carlos lopez carlos at dml.vic.edu.au
Wed Apr 16 18:41:11 EDT 2008


Have you tried the CDATA element? (http://www.w3.org/TR/2006/REC-xml-20060816/#sec-cdata-sect) It 
allows you to enter content markup, as opposed to your RSS feed markup, without having to escape or 
replace characters.

For example, from http://commandline.org.uk/index.rss20
---------------------------------------------------------
<item>
    <title>Linus Torvalds on ...</title>
    <guid isPermaLink="false">more/linus-quotes-2008-04-16-21-20</guid>
    <link>http://commandline.org.uk/more/linus-quotes-2008-04-16-21-20.html</link>
    <description><![CDATA[
<p>Linus Torvalds writes the Linux kernel, he also likes a good mailing list flamewar, not least 
because he has a very sarcasatic wit. Here he is, writing about various topics.</p>

<p>On fair use:</p>

<blockquote><p>When you start thinking that you have absolute control over the
content or programs you produce, and that the rest of the worlds opinions
doesn't matter, you're just _wrong_.</p></blockquote>
.......

.......
]]>
----------------------------------------------------------
Notice how the <p> and <blockquote> tags are entered unaltered. The same should happen with anchor 
tags, or any HTML tag.

c.



Marcie Pierson wrote:
> I'm not quite sure I understand the problem, but I might have a solution. First, my question: Does your link not work in the RSS feed? Is the link live in the blog post?
>  
> The solution I use when creating XML/RSS by hand is to replace the brackets (<a href="">) with the character entities &lt; and &gt; (&lt;a href=""&gt;). Does that help?
>  
> Marcie Pierson
> Reference Librarian
> Grafton Public Library
> 35 Grafton Common 
> Grafton, MA 01519
> 508-839-4649
> 508-839-7726 FAX
> 
> ________________________________
> 
> From: web4lib-bounces at webjunction.org on behalf of Engel, Ryan
> Sent: Wed 4/16/2008 3:32 PM
> To: web4lib at webjunction.org
> Subject: [Web4lib] RSS and HTML (href) links
> 
> 
> 
> Hi
> 
> 
> 
> We have a small collection of internal websites, and we share some
> content between them via RSS.  This content sharing has been fairly
> successful so far, but there is one piece of the puzzle that I cannot
> make fit no matter what I try, making me wonder I'm trying to use RSS in
> a way that it isn't meant to work.
> 
> 
> 
> Here's my setup:
> 
> I have a blog, and the blogging software (WordPress) I use creates a
> feed (RSS 2 and Atom) that contains the full text of my post.
> 
> Within the body of a hypothetical blog post, I include a basic href=""
> link to another website.
> 
> 
> 
> When I view the source of the RSS feed, I see two versions of my blog
> post's content; one is bracketed with <description> tags and DOES NOT
> contain my href link; the other is bracketed with <content:encoded> tags
> and DOES contain my href link.  When I look at the RSS in a feed reader,
> the href link does not appear.  The RSS feed does contain the usual link
> from the title back to my blog post.
> 
> 
> 
> Aside from the title link, it seems that RSS does not currently support
> href links; is that true?  If so, is there a way to re-assert links as
> clickable links in the body content either in the feed directly or once
> the feed reader reads the feed?  Am I trying to use RSS in a way that it
> isn't meant to work?
> 
> 
> 
> I've tried searching for clues via Google search already with no useful
> results, though I've had difficulty coming up with meaningful search
> phrases.
> 
> 
> 
> Thanks
> 
> 
> 
> Ryan Engel
> 
> Librarian | CNN News Research and Archives | Atlanta
> 
> ryan.engel at turner.com
> 
> _______________________________________________
> Web4lib mailing list
> Web4lib at webjunction.org
> http://lists.webjunction.org/web4lib/
> 
> 
> 
> _______________________________________________
> Web4lib mailing list
> Web4lib at webjunction.org
> http://lists.webjunction.org/web4lib/
> 
> 
> 

-- 
___________________

Carlos Lopez
Assistant Cataloguer
The Dalton McCaughey Library
1 Morrison Close
Parkville, Vic. 3052
Australia
Ph:   +61 3 93408885
Fax: +61 3 93408889
www.dml.vic.edu.au




More information about the Web4lib mailing list