Browse Source

bugfix: pass only known parameters to the url

master
Christian Mueller 12 years ago
parent
commit
ec267671a5
  1. 2
      resources/public/api-test.html
  2. 2
      src/notehub/api.clj

2
resources/public/api-test.html

@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
<label>PSK</label>
<input id="psk" type="text">
<label>API version</label>
<input id="version" type="text" value="1.3">
<input id="version" type="text" value="1.4">
<br/>
<ul class="nav nav-tabs">
<li id="get-li" class="active"><a href="javascript:selectForm('#get')">Get Note</a></li>

2
src/notehub/api.clj

@ -107,7 +107,7 @@ @@ -107,7 +107,7 @@
(when (blank? note) "note is empty")])]
(if (empty? errors)
(let [[year month day] (map str (get-date))
params (dissoc params :note :pid :signature :password :version :session)
params (select-keys params [:text-font :header-font :theme])
raw-title (filter #(or (= \- %) (Character/isLetterOrDigit %))
(-> note derive-title trim (sreplace " " "-") lower-case))
max-length (get-setting :max-title-length #(Integer/parseInt %) 80)

Loading…
Cancel
Save