Search code examples
iosuiwebview

UIWebView magically underlines some kind of text


If "Card.io" is written in the html string, UIWebview shows it as an underlined text in the below string.

<p>
    <strong>Card.io</strong>
    <br />The MIT License (MIT)<br />
    Copyright (c) 2013-2016 PayPal Holdings, Inc.<br />
    Permission is hereby granted, ...<br />
    The above copyright notice ...<br />
    THE SOFTWARE IS PROVIDED "AS IS" ... <br />...
    ......
</p>

If "Hello World" is written instead of "Card.io", UIWebview shows it as bold only not underlined as expected.

<p>
    <strong>Hello World</strong>
    <br />The MIT License (MIT)<br />
    Copyright (c) 2013-2016 PayPal Holdings, Inc.<br />
    Permission is hereby granted, ...<br />
    The above copyright notice ...<br />
    THE SOFTWARE IS PROVIDED "AS IS" ... <br />...
    ......
</p>

Why does UIWebView shows "Card.io" as underlined string? Any ideas?


Solution

  • For this issue unchecked "Link" property of UIWebView.

    enter image description here

    Now you get expected output as your requirement.

    enter image description here

    enter image description here