tags:

views:

31

answers:

2

Hi guys,

I am building an rss feed and i have this for description:

string sDescription = "<a href=\"" + sLink+"\"><img style=\"padding:10px\" align=\"left\" style=\"padding:10px\" width=\""+CImageDimensions.getProductImageDetailedWidth(CCategorii.CARTI_ID,
        book.Carti_id) + "\" src=\"" + PathsUtil.getBaseUrl() + control.ResolveUrl(ImageUtils.getThumbnailUrl(book.Poza_1)) + "\"/></a><div style=\"padding: 10px\"><p>" + book.Descriere_mica + "</p></div>";

You see that i put a little bit of padding to the img attribute:

style=\"padding:10px\"

I do not understand why this is not loaded...I mean, in FF i see:

<img width="130" align="left" src="http://localhost:2440/gramma_prod/Images/Carti/Opere_complete_si_scoliile_Sfintului_Maxim_Marturisitorul1.Dionisie Aeropagitul_thumb.jpg"/>

All others attributes of img tag are taken correctly but style is missing...

Do you have any ideea why?

A: 

You will need to HTML encode the output. http://msdn.microsoft.com/en-us/library/w3te6wfz.aspx

Dustin Laine
I do not think this is the problem....I can see the image, i can see all the text, so the tags are correctly interpreted. Plus, i put it in CDATA.oBuilder.Append("<description><![CDATA[ "); oBuilder.Append(sDescription); oBuilder.Append(" ]]> </description>");
Cristian Boariu
+1  A: 

It's possible that not all the CSS features are supported in displaying RSS. In fact, RSS should only send information, not information about how to render the information within. Try this attributes: hspace and vspace. An example here: http://www.w3schools.com/TAGS/att_img_hspace.asp

Hope you the best luck!

Softy
hSpace it's working!!! Thanks a lot!
Cristian Boariu