Drab: remote controlled frontend framework for Phoenix

Anybody knows how to deal with special charactors?

Using special characters in form, and input causes error.

for example,
(1) % causes invalid www-form error (encoded form of ascii like %25 is okay)
(2) & makes my input params to be divided.

and because of (2), when handling wyswig editor’s innerHTML to be escaped also causes problems.

my form is like below

<form>
  <div class="form-group">
    <label for="accordion_body" class="form-label">body</label>
    <textarea id="accordion_body" name="accordion_body"><%= @accordion.body %></textarea>
  </div>
  <input id="widget_name_of_accordions" name="widget_name" value="accordion" class="hidden"/>
  <button class="btn btn-primary hidden" drab-click="save_accordion">Save</button>
</form>

if i type input like this.
accordion_body: Default Text will be like&lt ;THIS&gt ;

and i inspect sender params,

%{"accordion_body" => "Default Text will be like",
  "lt;THIS" => nil, "gt;" => nil,
  "widget_name" => "accordion"}
1 Like