Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 1b18d13

Browse files
List autodividers: use trim() to avoid issues with newlines and spaces in markup. Fixes #5197. Thanks @demonslord !
1 parent e2f3ff9 commit 1b18d13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/widgets/listview.autodividers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ define( [ "jquery", "./listview" ], function( $ ) {
99
$.mobile.listview.prototype.options.autodividers = false;
1010
$.mobile.listview.prototype.options.autodividersSelector = function( elt ) {
1111
// look for the text in the given element
12-
var text = elt.text() || null;
12+
var text = $.trim( elt.text() ) || null;
1313

1414
if ( !text ) {
1515
return null;

0 commit comments

Comments
 (0)