Because styling inputs is difficult I'm hiding the inputs in a simple_form and spoofing them with labels.
I'd like the label for the submit button to display a unicode character, but putting it in the second parameter escapes it as plain text.
With HAML:
= simple_form_for @post, html: {multipart: true} do |f|
= f.file_field :file, {id: "file"}
= f.button :submit, {id: "submit"}
= label_tag(:file, "upload file")
= label_tag(:submit, "↑")
Displays "upload file, ↑"
If you don't want Rails to escape automatically, you can use raw(stringish)
helper method.
so it should be:
= simple_form_for @post, html: {multipart: true} do |f|
= f.file_field :file, {id: "file"}
= f.button :submit, {id: "submit"}
= label_tag(:file, "upload file")
= label_tag(:submit, raw("↑"))
FYI, it is not recommended if the data is coming from the user's input.