开发者

Keep phone numbers from being converted to links on Opera Mobile

Apparently, those guys at Opera have added a nice feature to their mobile version of the browser: They convert things looking like phone numbers into HTML links on webpages (e.g. USD 15.50, which clearly isn't a phone number).

The feature is described here: http://my.opera.com/operamobile/blog/2010/02/12/opera-mobile-10-beta-3-for-both-symbian-s60-and-windows-mobile

Can that be suppressed in HTML using a proprietary META tag or something like that? It really screws up our appli开发者_高级运维cation... Do other mobile browsers also have such a feature that I should be aware of?

EDIT: Thanks for providing me with the link to the questions indicating the <meta name="format-detection" content="telephone=no"> tag. That appears to solve the problem on the iPhone, but not on Opera Mobile


A lame solution:

Use Javascript to remove any links with href="tel:...".


After some trial and error this seems to work in Opera Mobile and on Mobilizer:

The HTML text (really should be "Samsung MSC 13800 TEU")

Samsung MSC 13,800 TEU

(put a span tag around the comma with a class of "hide")

The CSS

span.hide { display:none; }

The comma is a fudge within "13800 TEU" and probably very annoying for assistive technology users (those with screen readers) but I follow that 80-20 principle (there would be more confused sighted users than those with a vision impairment ;-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜