Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS 6 - HTML encoded entities are not showing
    text
    copied!<p>I am trying to show following HTML encoded form of string in UI.</p> <pre><code> &amp;#12402;&amp;#12423;&amp;#18780; &amp;#22988;&amp;#31078;&amp;#27247;&amp;#12397;&amp;#35086; &amp;#12428;&amp;#12378;&amp;#12375;&amp;#12421;&amp;#12366;&amp;#12421;&amp;#31299; &amp;#12386;&amp;#12423;&amp;#31784;&amp;#12445;&amp;#12376;&amp;#27695; &amp;#33519;&amp;#18147;&amp;#34788; &amp;#35253;&amp;#12384;&amp;#30440;&amp;#43278;&amp;#25315; &amp;#22831;&amp;#12386;&amp;#12419;&amp;#28975;&amp;#22501;&amp;#27045; &amp;#26958;&amp;#12409;&amp;#26970; &amp;#22377;&amp;#12389;, &amp;#35212;&amp;#12403;&amp;#12423; &amp;#12399;&amp;#18846;&amp;#12403;&amp;#12386;&amp;#12376;&amp;#12423; &amp;#27687;&amp;#12408;&amp;#12532;&amp;#12455;&amp;#26660;&amp;#20774; &amp;#12386;&amp;#12421;&amp;#22823;&amp;#24297; &amp;#12407;&amp;#35557; &amp;#30986;&amp;#18152;&amp;#12395;&amp;#12423; &amp;#35174;&amp;#32166;&amp;#21347;&amp;#26956;&amp;#18997; &amp;#12364;&amp;#26919;&amp;#12426;&amp;#12421;&amp;#27139;&amp;#39500; &amp;#34789;&amp;#12446;&amp;#30565;&amp;#30437;&amp;#18979; &amp;#39436;&amp;#25455; &amp;#39529;&amp;#12366;&amp;#12423;&amp;#12385;&amp;#12421; &amp;#12524;&amp;#12444;&amp;#14943;&amp;#12459;&amp;#12464;&amp;#12457;&amp;#38542; &amp;#29482;&amp;#20207;&amp;#22762;&amp;#40680;&amp;#12470; &amp;#12428;&amp;#12378;&amp;#12375;&amp;#12421;&amp;#12366;&amp;#12421;&amp;#31299;, &amp;#12362;&amp;#18690; &amp;#12404;&amp;#12421;&amp;#12395;&amp;#12421;&amp;#18915;&amp;#37864;&amp;#20197; &amp;#12467;&amp;#12374;&amp;#12385;&amp;#12419;&amp;#14372;&amp;#12472;&amp;#12519; &amp;#33512;&amp;#19503;&amp;#12362; </code></pre> <p>Using this <a href="https://github.com/mwaterfall/MWFeedParser/blob/master/Classes/NSString+HTML.h" rel="nofollow">library</a>, I wrote following code</p> <pre><code>#import "NSString+HTML.h" NSLog(@"%@",plainText); NSLog(@"%@",[plainText stringByDecodingHTMLEntities]); </code></pre> <p>On executing code, I am getting following exception:</p> <pre><code> -[__NSCFString stringByDecodingHTMLEntities]: unrecognized selector sent to instance 0x7bd4200 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString stringByDecodingHTMLEntities]: unrecognized selector sent to instance 0x7bd4200' *** First throw call stack: (0x1caa012 0x10e7e7e 0x1d354bd 0x1c99bbc 0x1c9994e 0xa72d 0x4a0e53f 0x4a20014 0x4a107d5 0x1c50af5 0x1c4ff44 0x1c4fe1b 0x1c047e3 0x1c04668 0x2bffc 0x237d 0x22a5 0x1) libc++abi.dylib: terminate called throwing an exception </code></pre> <p><strong>Note:</strong> I also tested my HTML encoded string on <a href="http://www.webtoolhub.com/tn561387-html-encoder-decoder.aspx" rel="nofollow">this</a> link and found no errors in my string format.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload