1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-18 11:52:11 +01:00

Examples: Fix: SyntaxHighlighter was having problems with copy and paste in webkit browsers - fix pushed to syntax highlighter here: https://github.com/alexgorbatchev/SyntaxHighlighter/pull/86 - this is the commit of that fix to the local copy

This commit is contained in:
Allan Jardine 2012-01-28 10:08:43 +00:00
parent a057b9d8cf
commit 019b235b0e

View File

@ -1798,6 +1798,9 @@ function quickCodeHandler(e)
// using \r instead of \r or \r\n makes this work equally well on IE, FF and Webkit
code = code.join('\r');
// For Webkit browsers, replace nbsp with a breaking space
code = code.replace(/\u00a0/g, " ");
// inject <textarea/> tag
textarea.appendChild(document.createTextNode(code));