Compiling to iOS or Android fails when JSON contains HTML tags

I have simple blog app reading remote JSON and displaying infinite load of data with load more option, category selection etc.
Hence JSON is coming from production environment I cannot change it. Some of JSON properties are coming with injected HTML tags from CKEditor. Well, some images too, and similar HTML tags, like video embed etc. What I am trying to do (unless I have JSON restructured and completed as HTML FREE JSON ) is to show results clearing out article property from HTML (code below).

	function stripHTML(text) {
		var desiredProperty = text.replace(/<.*?>/gm, '') 
	        return desiredProperty.replace(/[^\w\s]/gi, '');

Issue is that FUSE preview does not fail. However, after build is completed and I load applications some issue happens on real devices. Both iOS and Android would show up blank rectangle (with the full length of content).
Blank rectangle is white in iOS and in black in Android. I wish I can attach screenshots to explain it better.

What is that I am doing wrong and obviously I see an issue in Fuse otherwise preview should fail in Fuse too.

Hi boban,

while HTML inside JSON doesn’t sound too fun, clearing it with regex sounds like a sane thing to do.

The “rectangles” you refer to seem to be something entirely else though. Rendering Text elements on screen requires a certain amount of memory, depending on the font used, font size, letters in the text content and, of course, the content length. That amount of memory is limited, so if your text is too long, it can not be rendered.

Your best bet here is to split lengthy content in chunks and put those chunks in separate Text nodes, grouped together in a StackPanel or WrapPanel.

Hope this helps!

Correct, memory was causing issue so instead of text I was getting “rectangles” with correct text length.
Splitting JSON property and rendering 3 independent Text nodes fixed issue but again should be avoided and JSON should be HTML clean (suggestion for other developers so to avoid this issue).

Thank you for all your help!