diff --git a/index.html b/index.html
index f77e834a..4391f02c 100644
--- a/index.html
+++ b/index.html
@@ -130,8 +130,8 @@
Reading article
from archive... Please wait

diff --git a/js/app.js b/js/app.js
index 3f2854b9..7432a5f7 100644
--- a/js/app.js
+++ b/js/app.js
@@ -250,19 +250,18 @@ define(function(require) {
* @param {type} titleArray
*/
function populateListOfTitles(titleArray) {
- var titleListUl = $('#titleList');
+ var titleListDiv = $('#titleList');
// Remove previous results
- titleListUl.empty();
+ titleListDiv.empty();
for (var i = 0; i < titleArray.length; i++) {
var title = titleArray[i];
- var titleLi = document.createElement('li');
var titleA = document.createElement('a');
+ titleA.setAttribute("class","list-group-item");
titleA.setAttribute("titleId", title.toStringId());
titleA.setAttribute("href", "#");
- $(titleA).append(title.name);
+ $(titleA).append(title.getReadableName());
$(titleA).on("click",handleTitleClick);
- $(titleLi).append(titleA);
- titleListUl.append(titleLi);
+ titleListDiv.append(titleA);
}
$('#searchingForTitles').hide();
}
diff --git a/js/lib/title.js b/js/lib/title.js
index 410069ae..146edfcf 100644
--- a/js/lib/title.js
+++ b/js/lib/title.js
@@ -23,7 +23,7 @@ define(function(require) {
;
Title.prototype.getReadableName = function() {
- return this.name.replace("_", " ");
+ return this.name.replace(/_/g, " ");
};