Skip to content

Commit

Permalink
Merge pull request #31820 from nextcloud/fix/30002
Browse files Browse the repository at this point in the history
Explicitly close div element
  • Loading branch information
artonge authored Apr 5, 2022
2 parents 835e28d + 4763a12 commit 9c84aa5
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion apps/files/js/fileactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@
// recreate fileactions container
nameLinks = parent.children('a.name');
nameLinks.find('.fileactions, .nametext .action').remove();
nameLinks.append('<span class="fileactions" />');
nameLinks.append('<span class="fileactions"></span>');
var defaultAction = this.getDefaultFileAction(
this.getCurrentMimeType(),
this.getCurrentType(),
Expand Down
6 changes: 3 additions & 3 deletions apps/files/js/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,12 @@ var createDragShadow = function(event) {

$(selectedFiles).each(function(i,elem) {
// TODO: refactor this with the table row creation code
var newtr = $('<tr/>')
var newtr = $('<tr></tr>')
.attr('data-dir', dir)
.attr('data-file', elem.name)
.attr('data-origin', elem.origin);
newtr.append($('<td class="filename" />').text(elem.name).css('background-size', 32));
newtr.append($('<td class="size" />').text(OC.Util.humanFileSize(elem.size)));
newtr.append($('<td class="filename"></td>').text(elem.name).css('background-size', 32));
newtr.append($('<td class="size"></td>').text(OC.Util.humanFileSize(elem.size)));
tbody.append(newtr);
if (elem.type === 'dir') {
newtr.find('td.filename')
Expand Down
2 changes: 1 addition & 1 deletion apps/files/js/sidebarpreviewtext.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$thumbnailDiv.removeClass('icon-loading icon-32');
$thumbnailContainer.addClass('large');
$thumbnailContainer.addClass('text');
var $textPreview = $('<pre/>').text(content);
var $textPreview = $('<pre></pre>').text(content);
$thumbnailDiv.children('.stretcher').remove();
$thumbnailDiv.append($textPreview);
$thumbnailContainer.css("max-height", previewHeight);
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function addSelect2 ($elements, userListLimit) {
return element.name;
},
formatResult: function (element) {
var $result = $('<span><div class="avatardiv"/><span>'+escapeHTML(element.displayname)+'</span></span>');
var $result = $('<span><div class="avatardiv"></div><span>'+escapeHTML(element.displayname)+'</span></span>');
var $div = $result.find('.avatardiv')
.attr('data-type', element.type)
.attr('data-name', element.name)
Expand Down
4 changes: 2 additions & 2 deletions apps/files_sharing/js/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,12 @@ OCA.Sharing.PublicApp = {
},

_showTextPreview: function (data, previewHeight) {
var textDiv = $('<div/>').addClass('text-preview');
var textDiv = $('<div></div>').addClass('text-preview');
textDiv.text(data);
textDiv.appendTo('#imgframe');
var divHeight = textDiv.height();
if (data.length > 999) {
var ellipsis = $('<div/>').addClass('ellipsis');
var ellipsis = $('<div></div>').addClass('ellipsis');
ellipsis.html('(&#133;)');
ellipsis.appendTo('#imgframe');
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/OC/eventsource.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const OCEventSource = function(src, data) {
} else {
var iframeId = 'oc_eventsource_iframe_' + OCEventSource.iframeCount
OCEventSource.fallBackSources[OCEventSource.iframeCount] = this
this.iframe = $('<iframe/>')
this.iframe = $('<iframe></iframe>')
this.iframe.attr('id', iframeId)
this.iframe.hide()

Expand Down
4 changes: 2 additions & 2 deletions core/src/components/MainMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const setUp = () => {
$app.find('div').remove() // prevent odd double-clicks
// no need for theming, loader is already inverted on dark mode
// but we need it over the primary colour
$app.prepend($('<div/>').addClass('icon-loading-small'))
$app.prepend($('<div></div>').addClass('icon-loading-small'))
} else {
// Close navigation when opening app in
// a new tab
Expand All @@ -103,7 +103,7 @@ export const setUp = () => {
if (event.which === 1 && !event.ctrlKey && !event.metaKey && $app.parent('#more-apps').length === 0 && $app.attr('target') !== '_blank') {
$app.find('svg').remove()
$app.find('div').remove() // prevent odd double-clicks
$app.prepend($('<div/>').addClass(
$app.prepend($('<div></div>').addClass(
OCA.Theming && OCA.Theming.inverted
? 'icon-loading-small'
: 'icon-loading-small-dark'
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/UserMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const setUp = () => {
if (!$excludedPageClasses.includes($page.attr('class'))) {
$page.find('img').remove()
$page.find('div').remove() // prevent odd double-clicks
$page.prepend($('<div/>').addClass('icon-loading-small'))
$page.prepend($('<div></div>').addClass('icon-loading-small'))
}
} else {
// Close navigation when opening menu entry in
Expand Down
4 changes: 2 additions & 2 deletions core/src/jquery/ocdialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $.widget('oc.ocdialog', {
this.originalTitle = this.element.attr('title')
this.options.title = this.options.title || this.originalTitle

this.$dialog = $('<div class="oc-dialog" />')
this.$dialog = $('<div class="oc-dialog"></div>')
.attr({
// Setting tabIndex makes the div focusable
tabIndex: -1,
Expand Down Expand Up @@ -133,7 +133,7 @@ $.widget('oc.ocdialog', {
if (this.$buttonrow) {
this.$buttonrow.empty()
} else {
const $buttonrow = $('<div class="oc-dialog-buttonrow" />')
const $buttonrow = $('<div class="oc-dialog-buttonrow"></div>')
this.$buttonrow = $buttonrow.appendTo(this.$dialog)
}
if (value.length === 1) {
Expand Down
4 changes: 2 additions & 2 deletions dist/core-login.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-login.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/core-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-main.js.map

Large diffs are not rendered by default.

0 comments on commit 9c84aa5

Please sign in to comment.