Closed puneet18190 closed 9 years ago
Where and how did you add your string ? Can you show me some code ?
news_headlines= [] news_headline = NewsHeadlineBuilder.BuildFrom(string_1,string_2) news_headlines.push(news_headline) Dashing.send_event('headlines', { :headlines => news_headlines})
class NewsHeadlineBuilder def self.BuildFrom(a,b) { title: a, description: b, } end end
string_2 contains html like
string_2 contains string with html tags like < h1 >Hello </ h1>
what widget do you use to display your text ?
app/views/dashing/widgets/headlines.html
< div class="heading"> < span> Headlines
ok so it's a custom widget you created ? If so, you need to sanitize the string containing your html on the widget. It's not related to how dashing-rails sends you the data but how you use it in your widget.
I want to scrap news from http://www.propertyreporter.co.uk/rss.asp and display it on dashing page. But under description node, there is html with img tag and on dashing page, html is displayed as a string. I need to know how can I change string with html tags to html .
In rails, I used raw or html_safe methods for html string which display html in browser but using dashing-rails, I need to know where I can use it.
It's not a dashing-rails issue. You need to do that yourself using jquery for example http://stackoverflow.com/questions/24816/escaping-html-strings-with-jquery
I want to display a string like
Hello
on dashing page with styles but it display in string. I need to know how can I display a string with styles on my dashing page.