aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/import.html
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2015-06-11 13:53:27 +0200
committerArthurHoaro <arthur@hoa.ro>2015-06-23 16:35:36 +0200
commit5f85fcd863fe261921953ea3bd1742f3e1b7cf68 (patch)
tree5615922c1c696ec04cc60625a8d401b2b297a462 /tpl/import.html
parent0923a2bc1b097bf1def882722db489d83d95c423 (diff)
downloadShaarli-5f85fcd863fe261921953ea3bd1742f3e1b7cf68.tar.gz
Shaarli-5f85fcd863fe261921953ea3bd1742f3e1b7cf68.tar.zst
Shaarli-5f85fcd863fe261921953ea3bd1742f3e1b7cf68.zip
Working on shaarli/Shaarli#224
I reviewed character escaping everywhere with the following ideas: * use a single common function to escape user data: `escape` using `htmlspecialchars`. * sanitize fields in `index.php` after reading them from datastore and before sending them to templates. It means no escaping function in Twig templates. 2 reasons: * it reduces risks of security issue for future user made templates * more readable templates * sanitize user configuration fields after loading them.
Diffstat (limited to 'tpl/import.html')
-rw-r--r--tpl/import.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/tpl/import.html b/tpl/import.html
index 9ac3c2f9..6c4f9421 100644
--- a/tpl/import.html
+++ b/tpl/import.html
@@ -5,11 +5,11 @@
5<div id="pageheader"> 5<div id="pageheader">
6 {include="page.header"} 6 {include="page.header"}
7 <div id="uploaddiv"> 7 <div id="uploaddiv">
8 Import Netscape HTML bookmarks (as exported from Firefox/Chrome/Opera/Delicious/Diigo...) (Max: {$maxfilesize|htmlspecialchars} bytes). 8 Import Netscape HTML bookmarks (as exported from Firefox/Chrome/Opera/Delicious/Diigo...) (Max: {$maxfilesize} bytes).
9 <form method="POST" action="?do=upload" enctype="multipart/form-data" name="uploadform" id="uploadform"> 9 <form method="POST" action="?do=upload" enctype="multipart/form-data" name="uploadform" id="uploadform">
10 <input type="hidden" name="token" value="{$token}"> 10 <input type="hidden" name="token" value="{$token}">
11 <input type="file" name="filetoupload"> 11 <input type="file" name="filetoupload">
12 <input type="hidden" name="MAX_FILE_SIZE" value="{$maxfilesize|htmlspecialchars}"> 12 <input type="hidden" name="MAX_FILE_SIZE" value="{$maxfilesize}">
13 <input type="submit" name="import_file" value="Import" class="bigbutton"><br> 13 <input type="submit" name="import_file" value="Import" class="bigbutton"><br>
14 <input type="checkbox" name="private" id="private"><label for="private">&nbsp;Import all links as private</label><br> 14 <input type="checkbox" name="private" id="private"><label for="private">&nbsp;Import all links as private</label><br>
15 <input type="checkbox" name="overwrite" id="overwrite"><label for="overwrite">&nbsp;Overwrite existing links</label> 15 <input type="checkbox" name="overwrite" id="overwrite"><label for="overwrite">&nbsp;Overwrite existing links</label>