mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
Fix title='_' case too #685
This commit is contained in:
@ -55,10 +55,11 @@
|
||||
const humanFriendlyTitle = (title) => {
|
||||
if (typeof title === 'string' && title.length > 0) {
|
||||
title = title.replace(/_/g, ' ');
|
||||
return htmlEncode(title[0].toUpperCase() + title.slice(1));
|
||||
} else {
|
||||
return '';
|
||||
if (title.length > 0) {
|
||||
return htmlEncode(title[0].toUpperCase() + title.slice(1));
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
function htmlEncode(str) {
|
||||
|
Reference in New Issue
Block a user