Foswiki on GitHub is open for business! Next release meeting: Monday Dec. 1, 1300Z

Item10587: New jquery gives error when accessing meta variable

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Extension JQueryPlugin  
(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 CopyrightStatement. Creative Commons License