SyntaxHighlighter problems with jQuery 1.7.1

Recently I upgraded my WordPress plugins to jQuery version 1.7.1 and noticed that Internet Explorer 8 was causing errors “‘null’ is null or not an object”. I isolated this to the SyntaxHighlighter Evolved WordPress plugin I was also uses.

On further Googling it seemed that there were issues with the XRegExp library and jQuery 1.7.1, reported by other uses on IE 6 to 9. Schabse Laks posted a fix to the problem on his blog, though this gave me a new error, so I have modified it slightly, modification on line 271;

RegExp.prototype.exec = function (str) {
	if (typeof(str) !== "string")
		str = String(str);
	var match = real.exec.apply(this, arguments),
		name, r2;

Download the resolved SyntaxHighlighter files here
shCore.max.js
shCore.js


Posted

in

,

by

Comments

11 responses to “SyntaxHighlighter problems with jQuery 1.7.1”

  1. Henry Avatar
    Henry

    You sir are a genius. Keep up the good work. I was totally stumped until I read this post. Can’t understand why the latest version of SH is not working.

  2. JackyPeng Avatar

    it solved my problem, Thanks a lot ! 

  3. […] 還好找到這篇文章 SyntaxHighlighter problems with jQuery 1.7.1:http://mectile.com/syntaxhighlighter-problems-with-jquery-1-7-1/ […]

  4. yundanran Avatar
    yundanran

    Thanks ,it solved my problem,too

  5. Cloudcome Avatar
    Cloudcome

    tks

  6. jQuery 1.7.1 和 syntaxHighlighter 3.0.8 在ie8以下报错 | 云淡然

    […] shCore.js 此条目由 云淡然 发表在 jQuery 分类目录,并贴了 jQuery、语法高亮 […]

  7. Nicolas Mollet Avatar
    Nicolas Mollet

    Thanks, saved me lots of time!

  8. Jquery1.7.1与SyntaxHighlighter在IE8下脚本错误修正 | 梧桐树下

    […] SyntaxHighlighter problems with jQuery 1.7.1 […]

  9. raks Avatar
    raks

    God bless you. Saved me lots of time.

Leave a Reply

Your email address will not be published. Required fields are marked *