Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent skype highlighting from corrupting textareas

In short, a text area programatically populated with a phone number in it, with the Skype plugin installed, produces the highlighting tags.

Thus,

(418) 555-1234

becomes

begin_of_the_skype_highlighting (418) 555-1234 end_of_the_skype_highlighting

And if that string is put inside the textarea, the Skype highlighting will encapsulate it again, Ad infinitum.

How do you prevent that?

like image 208
MPelletier Avatar asked Dec 28 '22 04:12

MPelletier


2 Answers

You should have a look at http://forum.skype.com/index.php?showtopic=96959&st=0

Looks like it is a reported bug, but not solved until now.

Suggestions are to use a meta tag (which seems to not work across all Skype plugins)

<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />

Introduce a non visible character that will break the skype algorithm for identifying phones

+123 456<span style="display:none;">_</span> 789

(don't think this can work with textareas though)

And of course disable the plugin, if the issue is with your own access to that page.


Update

Check if any of the two examples in http://www.jsfiddle.net/gaby/Qy7uw/ work. (i do not have skype to check)

I am using the zero-width-joiner &zwj; and the familiar &nbsp;

like image 78
Gabriele Petrioli Avatar answered Jan 12 '23 09:01

Gabriele Petrioli


Using CSS only, it can be removed by overriding the styles used by Skype. Try adding these two lines to your stylesheet:

span.skype_pnh_container {display:none !important;}
span.skype_pnh_print_container {display:inline !important;}

edit Skype have started to add unique numbers to the classes, you can solve it using the new Css 3 selector:

span.skype_pnh_container {display:none !important;}
span.skype_pnh_print_container, span[class^="skype_pnh_print_container"] {display:inline !important;} 
like image 45
Groo Avatar answered Jan 12 '23 10:01

Groo