1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Show note title in pdf export (#890) (#937)

* Show note title in pdf export (#890)

An example of a possible approach, to temporarily change the html in the webview to show the note title. Works, but there may be a more elegant fix.

* Show title in pdf export

Revising based on feedback
Also, a couple changes to tests so that they pass in Windows.
This commit is contained in:
Ben Fisher
2018-11-07 15:35:14 -08:00
committed by Laurent Cozic
parent cb1fd85ca4
commit 251f1bba55
5 changed files with 68 additions and 20 deletions

View File

@ -210,4 +210,13 @@ function urlDecode(string) {
return decodeURIComponent((string+'').replace(/\+/g, '%20'));
}
module.exports = { removeDiacritics, escapeFilename, wrap, splitCommandString, padLeft, toTitleCase };
function escapeHtml(s) {
return s
.replace(/&/g, "&")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#039;");
}
module.exports = { removeDiacritics, escapeFilename, wrap, splitCommandString, padLeft, toTitleCase, escapeHtml };