Prevent HTML escaping from xml?

Up vote 0 down vote favorite share g+ share fb share tw.

I'm trying to display some text strings that I have parsed from the tumblr api. I've tried all the normal solutions and I'm still coming unstuck. My page source is full of and I'm seeing in the rendered page.

I'm using rails 2. Help would be greatly appreciated :) In my view I have tried and My controller, which is parsing the xml with Hpricot: class TalktalksController New (docz/:post). Each do |post| @blog = Blog.

New @blog. Title = (post/'regular-title'). Inner_html @blog.

Created_at = post:date @blog. Body = (post/'regular-body'). Inner_html @blogroll Erb end end end ruby-on-rails xml escaping hpricot link|improve this question edited Apr 29 '11 at 4:20Ryan Bigg30.1k33164 asked Apr 29 '11 at 2:53Tim Sutcliffe133.

1 It's probably rendering it that way because that's how it's coming through in the XML. Can you provide us with an example of that XML? – Ryan Bigg Apr 29 '11 at 4:20 Sure thing Ryan - you can see the XML at jovio.tumblr.com/api/read – Tim Sutcliffe Apr 29 '11 at 5:13 As you predicted I can see lots of ascii in the xml.

Do you have a good idea about how to convert it back to html. I started to use gsub but this felt wrong. – Tim Sutcliffe Apr 29 '11 at 5:25 1 Well who knew?

– Tim Sutcliffe Apr 29 '11 at 6:36.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions