Foswiki on GitHub is open for business! Next release meeting: Monday September 15, 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
WaitingFor
Checkins Foswikirev:11294 Foswikirev:11295
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