kba / rssscrpr

Scrape web content to RSS feeds
https://rssscrpr.herokuapp.com/
MIT License
1 stars 2 forks source link

Handling CDATA #5

Closed zuphilip closed 9 years ago

zuphilip commented 9 years ago

Is it possible to handle CDATA somehow easy? E.g. when importing the RSS feed https://forums.zotero.org/search.php?PostBackAction=Search&Type=Comments&Feed=RSS2

kba commented 9 years ago

Should be working now.

zuphilip commented 9 years ago

Yes, it is better but not yet solved. Because the first text node inside CDATA in the description is now ignored, and for example only the text after a <br/> is outputed.

kba commented 9 years ago

It is working correctly, but the display in the user interface was wrong. CDATA parsing is slightly tricky: Need to get the text of the cdata node, jquery-append it to an element (so the text is parsed) and add that element to the DOM. Before, cdata was added as a whole, including opening and closing tags which jquery interpreted as a comment, hence the first element not showing up in the UI. Should be fixed now for descriptions.