Details
-
Bug
-
Resolution: Invalid
-
Major
-
None
-
6.2.1
-
None
-
Unknown
-
Description
On javascript.vm, we have:
## -------------------------------- ## Store the space name, page name, wiki name, full document name (for convenience since it can be reconstructed ## from the individual wiki/space/page names), and other metadata, so that it can be accessed from Javascript code. ## For example, to pass it to the server side using an Ajax query. ## Usage example: var name = $$("meta[name='page']")[0].content; ## ## -------------------------------- <meta name="document" content="$escapetool.xml($doc.fullName)"/> <meta name="wiki" content="$escapetool.xml($doc.wiki)"/> <meta name="space" content="$escapetool.xml($doc.space)"/> <meta name="page" content="$escapetool.xml($doc.name)"/> <meta name="version" content="$doc.version"/> <meta name="restURL" content="${request.contextPath}/rest/wikis/${xcontext.database}/spaces/$escapetool.url(${doc.space})/pages/$escapetool.url(${doc.name})"/> <meta name="form_token" content="$!{services.csrf.token}"/>
But when I write a script using:
$$("meta[name='wiki']")[0].content
It does not work.
Actually
$$("meta[name='wiki']")
returns an empty array.
Meanwhile
$$("meta[name='page']")
returns an array with the desired element.
I guess it breaks some extensions that uses these meta-tags.