Deprecate XWiki.extractFileName from xwiki.js

Hi everyone,

I worked a bit on xwiki.js recently and I discovered that we have a function extractFileName exposed in XWiki constant that is used nowhere in XWiki Standard. And it’s also not used at all in xwiki-contrib. I highly doubt we maintain or test that code, so I propose that we deprecate and move it to our compatibility.js.


Sounds good.

FTR I’ve checked my mail history of xwiki commits and I couldn’t find the introduction of that js function… weird.

Apparently introduced in XWIKI-6928: The importer adds the "C-fakepath" text in front of impor… · xwiki/xwiki-platform@f870dca · GitHub

Indeed, and the call was removed in XWIKI-5495: Office Importer ignores the parent setting in the URL alt… · xwiki/xwiki-platform@5fabafe · GitHub so @mflorea probably forgot to also remove the function or thought it could be useful for other use cases.

1 Like



+1 thanks


Done in [Misc] Deprecate extractFilename in xwiki.js · xwiki/xwiki-platform@2068049 · GitHub