Embedded comments: can I troubleshoot «View full post»?


(Raphaël Jadot) #1

Hello,

This is related to Embedded comments.

I have difficulties to understand how the importation/parsing of the page or blog post is working.
The topic content (first post), imported from RSS seems OK after several test. It seems that the content imported from RSS is the section between the XML tags <description></description>.

When I click «vîew full post», the rendering is not fine. It seems to be done from the HTML of the original page rather than RSS feed xml content. The result is, in my case, some tags are missing (espectially <br />) and Images are either incorrectly imported (for instance the url of an image is http://mysite.commyimage.jpg instead of http://mysite.com/myimage.jpg — precisely:missing slash with relative path imported images) either not imported at all (for images that are like this <img src='data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgA…' height='400' width='640' alt='Boot' class='adapt-img ' onmousedown='adaptImgFix(this)'/>. )

Is it something that happens to other? How can i troubleshoot importation of content, and improve it? Can’t «view full post» being rendered from the <content:encoded></content:encoded> RSS XML tags, instead of HTML (because in my case, rendered RSS is neater)?


(Raphaël Jadot) #2

If it may help, here is what a dummy post I made with images, formats, tables etc looks like once rendered in RSS:

<?xml
version="1.0" encoding="utf-8"?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:atom="http://www.w3.org/2005/Atom"
>

<channel xml:lang="en">
	<title>OpenMandriva</title>
	<link>https://www.openmandriva.org/</link>
	
	<language>en</language>
	<generator>SPIP - www.spip.net</generator>
	<atom:link href="https://www.openmandriva.org/spip.php?page=backend&amp;id_rubrique=10" rel="self" type="application/rss+xml" />

<image>
	<title>OpenMandriva</title>
	<url>https://www.openmandriva.org/local/cache-vignettes/L144xH144/siteon0-d64b7.png?1487804996</url>
	<link>https://www.openmandriva.org/</link>
	<height>144</height>
	<width>144</width>
</image>

<item xml:lang="en">
		<title>One last for the road</title>
		<link>https://www.openmandriva.org/en/news/article/one-last-for-the-road</link>
		<guid isPermaLink="true">https://www.openmandriva.org/en/news/article/one-last-for-the-road</guid>
		<dc:date>2017-05-19T23:14:06Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		 <dc:creator>Rapha&#235;l</dc:creator>
		
		<description>
&lt;p&gt;Nunc vero inanes flatus quorundam vile esse quicquid extra urbis pomerium nascitur aestimant praeter orbos et caelibes, nec credi potest qua obsequiorum diversitate coluntur &lt;br class='autobr' /&gt;
homines &lt;br class='autobr' /&gt;
sine liberis Romae. OpenMandriva Lx 3 desktopDefault desktop with &lt;span class=&#034;caps&#034;&gt;KDE&lt;/span&gt; &lt;br class='autobr' /&gt; Coin &lt;br class='autobr' /&gt; pwet &lt;br class='autobr' /&gt; zut auieaue auieaub uie&#233;&#232;o&#233;Sed ut tum ad senem senex de senectute, sic hoc libro ad amicum amicissimus scripsi de amicitia. &lt;br class='autobr' /&gt; Tum est Cato locutus, quo erat nemo fere senior temporibus illis, nemo prudentior; nunc&#160;(...)&lt;/p&gt;
-
&lt;a href="https://www.openmandriva.org/en/news/" rel="directory"&gt;News&lt;/a&gt;
		</description>

 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;Nunc &lt;i&gt;vero inanes&lt;/i&gt; flatus quorundam vile esse quicquid extra urbis pomerium nascitur aestimant praeter orbos et caelibes, nec credi potest qua obsequiorum diversitate coluntur&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt;homines&lt;/p&gt;
&lt;/blockquote&gt; &lt;p&gt;sine liberis Romae.&lt;/p&gt;
&lt;dl class='spip_document_2 spip_documents spip_documents_center media media_vignette'&gt; &lt;dt&gt;&lt;a href='https://www.openmandriva.org/IMG/png/omlx3.0-004.png' class=&#034;spip_in&#034; title=&#034;OpenMandriva Lx 3 desktop&#034; type=&#034;image/png&#034;&gt;&lt;img src='https://www.openmandriva.org/local/cache-vignettes/L320xH200/omlx3.0-004-4a9bc-90d0d.png?1495268414' width='320' height='200' alt='OpenMandriva Lx 3 desktop' /&gt;&lt;/a&gt;&lt;/dt&gt; &lt;dt class='spip_doc_titre crayon document-titre-2' style='max-width: 320px;'&gt;&lt;strong&gt;OpenMandriva Lx 3 desktop&lt;/strong&gt;&lt;/dt&gt;&lt;dd class='spip_doc_descriptif crayon document-descriptif-2' style='max-width: 320px;'&gt;Default desktop with &lt;span class=&#034;caps&#034;&gt;KDE&lt;/span&gt;
&lt;/dd&gt;&lt;/dl&gt;&lt;img src='https://www.openmandriva.org/local/cache-vignettes/L8xH11/puce-32883gif812-1993e.gif?1495270871' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt;
&lt;p&gt;&lt;img src='https://www.openmandriva.org/local/cache-vignettes/L8xH11/puce-32883.gif?1487804996' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Coin
&lt;br /&gt;&lt;img src='https://www.openmandriva.org/local/cache-vignettes/L8xH11/puce-32883.gif?1487804996' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; pwet
&lt;br /&gt;&lt;img src='https://www.openmandriva.org/local/cache-vignettes/L8xH11/puce-32883.gif?1487804996' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; zut&lt;/p&gt;
&lt;ol class=&#034;spip&#034;&gt;&lt;li&gt; auieaue
&lt;ol class=&#034;spip&#034;&gt;&lt;li&gt; auieaub&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt; uie&#233;&#232;o&#233;&lt;/li&gt;&lt;/ol&gt;&lt;blockquote class=&#034;spip_poesie&#034;&gt;&lt;div&gt;Sed ut tum ad senem senex de senectute, sic hoc libro ad amicum amicissimus scripsi de amicitia.&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt; Tum est Cato locutus, quo erat nemo fere senior temporibus illis, nemo prudentior; nunc &lt;del&gt;Laelius et s&lt;/del&gt;apiens (sic enim est habitus) et amicitiae gloria excellens de amicitia loquet&lt;sc&gt;ur. Tu velim&lt;/sc&gt; a me animum parumper avertas, Laelium loqui ipsum putes. C. Fannius et Q. Mucius&lt;strong&gt; ad socerum &lt;/strong&gt; veniunt post mortem Africani; ab his sermo oritur, respondet Laelius, cuius tota disputatio est de amicitia, &lt;strong class=&#034;caractencadre2-spip spip&#034;&gt;quam legens te ipse cognosces.&lt;/strong&gt;&lt;/p&gt;
&lt;table class=&#034;spip&#034; summary=&#034;summary&#034;&gt;
&lt;caption&gt;title&lt;/caption&gt;
&lt;thead&gt;&lt;tr class='row_first'&gt;&lt;th id='ida1ec_c0'&gt;auie&lt;/th&gt;&lt;th id='ida1ec_c1'&gt;aie &lt;/th&gt;&lt;th id='ida1ec_c2'&gt;a e&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td headers='ida1ec_c0'&gt;ai eae&lt;/td&gt;
&lt;td headers='ida1ec_c1'&gt;a ea&lt;/td&gt;
&lt;td headers='ida1ec_c2'&gt;aeauie&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td headers='ida1ec_c0'&gt;aieie&#233;pu&lt;/td&gt;
&lt;td headers='ida1ec_c1'&gt;po&lt;br class='autobr' /&gt;
o,po&lt;/td&gt;
&lt;td headers='ida1ec_c2'&gt;aueauei&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
		
	</content:encoded>
</item>

</channel>

</rss>