nextcloud/core/js/tests/specs
Daniel Calviño Sánchez 1466586033 Fix ids of permission checkboxes for shares
The ids of permission checkboxes for shares were generated using the
"shareWith" field of the share. The "shareWith" field can contain spaces
(as spaces are allowed, for example, in user or circle names), so this
could cause the id attribute of the HTML element to contain spaces too,
which is forbidden by the HTML specification.

It is not just a "formal" issue, though; when the list was rendered, if
the id contained a space the selector to get the checkbox element was
wrong (as it ended being something like
"#canEdit-view1-name with spaces") and thus the initial state of the
checkbox was not properly set.

Besides that, "shareWith" can contain too single quotes, which would
even cause the jQuery selector to abort the search and leave the UI in
an invalid state.

Instead of adding more cases to the regular expression to escape special
characters and apply it too when the ids are created now the ids of
permission checkboxes for shares are based on the "shareId" field
instead of on "shareWith", as "shareId" is expected to always contain
compatible characters.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-18 15:25:23 +02:00
..
files Merge pull request #6079 from nextcloud/fix-antivirus 2017-12-11 17:12:02 +01:00
systemtags Adjust the JS unit tests 2016-12-06 17:50:57 +01:00
appsSpec.js Fix javascript tests for sidebar animation 2016-07-30 16:30:05 +02:00
contactsmenuSpec.js There was an error loading → could not load 2018-01-20 09:15:50 +01:00
coreSpec.js Add CSRF token controller to retrieve the current CSRF token 2018-03-08 16:48:50 +01:00
jquery.avatarSpec.js Fix tests 2018-01-08 10:36:06 +01:00
jquery.contactsmenuSpec.js handle 404 separately 2017-04-26 09:30:21 +02:00
l10nSpec.js Harden t() with DOMPurify 2017-03-16 14:17:42 +01:00
mimeTypeSpec.js Reduce JSHint errors/warnings 2017-11-06 09:57:59 +01:00
oc-backbone-webdavSpec.js Fix system tags proppatch with booleans 2016-01-27 11:09:43 +01:00
setupchecksSpec.js Spelling: FreeType 2018-01-14 16:01:23 +01:00
shareSpec.js Merge pull request #6670 from nextcloud/handle-encryption-state-in-web-interface 2017-12-06 16:19:17 +01:00
sharedialoglinkshareview.js Reduce JSHint errors/warnings 2017-11-06 09:57:59 +01:00
sharedialogshareelistview.js Fix ids of permission checkboxes for shares 2018-04-18 15:25:23 +02:00
sharedialogviewSpec.js Keep showing the working icon while there are pending operations 2018-03-21 04:35:26 +01:00
shareitemmodelSpec.js Fix share capabilities JS tests 2018-02-27 12:29:25 +01:00