[Owncloud] Inline JS is going to be disabled - Important notice to all developers

Lukas Reschke lukas at owncloud.org
Tue Jan 22 16:31:45 UTC 2013


Hi all,

We want to inform all developers about an import change coming soon with
ownCloud 5.0.

Starting with ownCloud 5.0, all inline scripts will be disabled due to
security reason, this means that you will have to move all inline
javascript snippets to external files. There are the following ways to
perform this:

a) If your JS code contains PHP code:
Include the php file via <script> tags, e.g.:
https://github.com/owncloud/apps/commit/25268628904de7487f53b54002370fa231e5b86c
(You can also use routing if you want that the file ends with ".js":
https://github.com/owncloud/apps/commit/0a91fd38d4df6ae9fb2de47ca16da2eb8a704841
)

b) If your JS code contains no PHP code:
Just include the file as normal using OCP\Util::addscript('appname',
'filename') e.g.:
https://github.com/owncloud/apps/commit/986c07a196f39e80d7dba11fffc509fe24ef0eea

So, you have to act now - please have a look at this pull request:
https://github.com/owncloud/apps/pull/472

Don't worry! - Porting the apps is really straight forward, and for most
apps in the "apps" repo we have already done that for you!

Cheers,
Lukas

-- 
ownCloud
Your Cloud, Your Data, Your Way!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20130122/09c06407/attachment.html>


More information about the Owncloud mailing list