Skip to content

Commit d799998

Browse files
committed
Explicitly close div element
Fix: #30002 Signed-off-by: Louis Chemineau <louis@chmn.me>
1 parent 43220c6 commit d799998

13 files changed

Lines changed: 20 additions & 20 deletions

File tree

apps/files/js/fileactions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@
557557
// recreate fileactions container
558558
nameLinks = parent.children('a.name');
559559
nameLinks.find('.fileactions, .nametext .action').remove();
560-
nameLinks.append('<span class="fileactions" />');
560+
nameLinks.append('<span class="fileactions"></span>');
561561
var defaultAction = this.getDefaultFileAction(
562562
this.getCurrentMimeType(),
563563
this.getCurrentType(),

apps/files/js/files.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,12 +422,12 @@ var createDragShadow = function(event) {
422422

423423
$(selectedFiles).each(function(i,elem) {
424424
// TODO: refactor this with the table row creation code
425-
var newtr = $('<tr/>')
425+
var newtr = $('<tr></tr>')
426426
.attr('data-dir', dir)
427427
.attr('data-file', elem.name)
428428
.attr('data-origin', elem.origin);
429-
newtr.append($('<td class="filename" />').text(elem.name).css('background-size', 32));
430-
newtr.append($('<td class="size" />').text(OC.Util.humanFileSize(elem.size)));
429+
newtr.append($('<td class="filename"></td>').text(elem.name).css('background-size', 32));
430+
newtr.append($('<td class="size"></td>').text(OC.Util.humanFileSize(elem.size)));
431431
tbody.append(newtr);
432432
if (elem.type === 'dir') {
433433
newtr.find('td.filename')

apps/files/js/sidebarpreviewtext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
$thumbnailDiv.removeClass('icon-loading icon-32');
2626
$thumbnailContainer.addClass('large');
2727
$thumbnailContainer.addClass('text');
28-
var $textPreview = $('<pre/>').text(content);
28+
var $textPreview = $('<pre></pre>').text(content);
2929
$thumbnailDiv.children('.stretcher').remove();
3030
$thumbnailDiv.append($textPreview);
3131
$thumbnailContainer.css("max-height", previewHeight);

apps/files_external/js/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function addSelect2 ($elements, userListLimit) {
141141
return element.name;
142142
},
143143
formatResult: function (element) {
144-
var $result = $('<span><div class="avatardiv"/><span>'+escapeHTML(element.displayname)+'</span></span>');
144+
var $result = $('<span><div class="avatardiv"></div><span>'+escapeHTML(element.displayname)+'</span></span>');
145145
var $div = $result.find('.avatardiv')
146146
.attr('data-type', element.type)
147147
.attr('data-name', element.name)

apps/files_sharing/js/public.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,12 +355,12 @@ OCA.Sharing.PublicApp = {
355355
},
356356

357357
_showTextPreview: function (data, previewHeight) {
358-
var textDiv = $('<div/>').addClass('text-preview');
358+
var textDiv = $('<div></div>').addClass('text-preview');
359359
textDiv.text(data);
360360
textDiv.appendTo('#imgframe');
361361
var divHeight = textDiv.height();
362362
if (data.length > 999) {
363-
var ellipsis = $('<div/>').addClass('ellipsis');
363+
var ellipsis = $('<div></div>').addClass('ellipsis');
364364
ellipsis.html('(&#133;)');
365365
ellipsis.appendTo('#imgframe');
366366
}

core/src/OC/eventsource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const OCEventSource = function(src, data) {
6565
} else {
6666
var iframeId = 'oc_eventsource_iframe_' + OCEventSource.iframeCount
6767
OCEventSource.fallBackSources[OCEventSource.iframeCount] = this
68-
this.iframe = $('<iframe/>')
68+
this.iframe = $('<iframe></iframe>')
6969
this.iframe.attr('id', iframeId)
7070
this.iframe.hide()
7171

core/src/components/MainMenu.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const setUp = () => {
7777
$app.find('div').remove() // prevent odd double-clicks
7878
// no need for theming, loader is already inverted on dark mode
7979
// but we need it over the primary colour
80-
$app.prepend($('<div/>').addClass('icon-loading-small'))
80+
$app.prepend($('<div></div>').addClass('icon-loading-small'))
8181
} else {
8282
// Close navigation when opening app in
8383
// a new tab
@@ -103,7 +103,7 @@ export const setUp = () => {
103103
if (event.which === 1 && !event.ctrlKey && !event.metaKey && $app.parent('#more-apps').length === 0 && $app.attr('target') !== '_blank') {
104104
$app.find('svg').remove()
105105
$app.find('div').remove() // prevent odd double-clicks
106-
$app.prepend($('<div/>').addClass(
106+
$app.prepend($('<div></div>').addClass(
107107
OCA.Theming && OCA.Theming.inverted
108108
? 'icon-loading-small'
109109
: 'icon-loading-small-dark'

core/src/components/UserMenu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const setUp = () => {
4141
if (!$excludedPageClasses.includes($page.attr('class'))) {
4242
$page.find('img').remove()
4343
$page.find('div').remove() // prevent odd double-clicks
44-
$page.prepend($('<div/>').addClass('icon-loading-small'))
44+
$page.prepend($('<div></div>').addClass('icon-loading-small'))
4545
}
4646
} else {
4747
// Close navigation when opening menu entry in

core/src/jquery/ocdialog.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ $.widget('oc.ocdialog', {
4646
this.originalTitle = this.element.attr('title')
4747
this.options.title = this.options.title || this.originalTitle
4848

49-
this.$dialog = $('<div class="oc-dialog" />')
49+
this.$dialog = $('<div class="oc-dialog"></div>')
5050
.attr({
5151
// Setting tabIndex makes the div focusable
5252
tabIndex: -1,
@@ -133,7 +133,7 @@ $.widget('oc.ocdialog', {
133133
if (this.$buttonrow) {
134134
this.$buttonrow.empty()
135135
} else {
136-
const $buttonrow = $('<div class="oc-dialog-buttonrow" />')
136+
const $buttonrow = $('<div class="oc-dialog-buttonrow"></div>')
137137
this.$buttonrow = $buttonrow.appendTo(this.$dialog)
138138
}
139139
if (value.length === 1) {

dist/core-login.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)