Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Posts: 358
Registered: ‎04-13-2013
My Device: Z10
My Carrier: Telus
Accepted Solution

HTML formatting issue

[ Edited ]

So I'm trying to create an app the pulls an RSS feed from my website and i've set the <content> into a label to show in a page but for some reason, sometimes the HTML coding is wonky and doesn't format properly, just showing code.





Other times it shows up perfectly:



My code is this:


QString TLDRApp::findText(const QVariant item)
	QVariantMap itemData = item.toMap();
	QString description;
	        if (itemData.contains("content:encoded")) {
	            description = itemData["content:encoded"].toString();
	 return description;


Label {


text: <html>" + chosenItem.content + "</html>"


 What formatting can I add to ensure all the url links, paragraph breaks, bold/ italic letters and font size make it through and strip all the other formatting that may be causing the issue?


These are the only supported tags, so I was wondering if I could do a remove() and just focus on everything except for :





all help will be thanks and solutions marked.


thanks in advance, Brandon

Posts: 216
Registered: ‎09-18-2009
My Device: Z10
My Carrier: O2

Re: HTML formatting issue

Complete web sites are best displayed using a WebView.



Posts: 358
Registered: ‎04-13-2013
My Device: Z10
My Carrier: Telus

Re: HTML formatting issue

as per the suggestion.  I used a webview and a custom CSS layout to display the information.  Works better and allows other stuff like Youtube videos and multiple images to be displayed.