I have integrated the fckeditor syntax highlighting plugin from http://psykoptic.com/blog/post/2008/12/ ... ditor.aspx for SyntaxHighlighter.
The issue is that FckEditor is stripping my code escapes when I save. So
$sql = 'SELECT user_id, username FROM '.$prefix.'_users WHERE user_id <= \'20\' AND user_id != \'1\'';
Becomes
$sql = 'SELECT user_id, username FROM '.$prefix.'_users WHERE user_id <= '20' AND user_id != '1'';
The plugin comes with some helper functions in it's .js file, but I can't figure out how to get it working properly.
// ---------------------- // Helper functions // ---------------------- function HTMLEncode(text) { if (!text) return ''; text = text.replace(/&/g, '&'); text = text.replace(/</g, '<'); text = text.replace(/>/g, '>'); return text; } function HTMLDecode(text) { if (!text) return ''; text = text.replace(/>/g, '>'); text = text.replace(/</g, '<'); text = text.replace(/&/g, '&'); text = text.replace(/<br>/g, '\n'); text = text.replace(/"/g, '"'); return text; }
I tested this without the plugin installed and it still does it. Anyone have any suggestions?