Skip to content
This repository
Browse code

List autodividers: use trim() to avoid issues with newlines and space…

…s in markup. Fixes #5197. Thanks @demonslord !
  • Loading branch information...
commit 37daf96ffeb26939f0c23cb80f0447e9139e9fd0 1 parent d698ca4
Jasper de Groot authored October 25, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  js/widgets/listview.autodividers.js
2  js/widgets/listview.autodividers.js
@@ -9,7 +9,7 @@ define( [ "jquery", "./listview" ], function( $ ) {
9 9
 $.mobile.listview.prototype.options.autodividers = false;
10 10
 $.mobile.listview.prototype.options.autodividersSelector = function( elt ) {
11 11
 	// look for the text in the given element
12  
-	var text = elt.text() || null;
  12
+	var text = $.trim( elt.text() ) || null;
13 13
 
14 14
 	if ( !text ) {
15 15
 		return null;

0 notes on commit 37daf96

Please sign in to comment.
Something went wrong with that request. Please try again.