Item10587: New jquery gives error when accessing meta variable

Priority: Normal
Current State: Closed
Released In: n/a
Target Release: patch
Applies To: Extension
Component: JQueryPlugin
Reported By: ArthurClemens
Waiting For:
Last Change By: KennethLavrsen
(I think because of the inclusion of SizzleJs) jQuery 1.5+ doesn't like
var metaVal = $("meta[name=foswiki."+key+"]").attr("content");

The error results in blocked javascript.

The solution is to use quotes:
var metaVal = $("meta[name=\"foswiki."+key+"\"]").attr("content");

-- ArthurClemens - 03 Apr 2011

I have also made some improvements after running jslint.

-- ArthurClemens - 03 Apr 2011


ItemTemplate edit

Summary New jquery gives error when accessing meta variable
ReportedBy ArthurClemens
Codebase 1.1.3 beta1, trunk
SVN Range
AppliesTo Extension
Component JQueryPlugin
Priority Normal
CurrentState Closed
Checkins distro:1b49515c5145 distro:22f243321333
TargetRelease patch
ReleasedIn n/a
Topic revision: r6 - 16 Apr 2011, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy