I'm trying to get an input field to have a placeholder with bullet points in it.
= f.label "Password"
= f.password_field :password, autocomplete: "off",
placeholder: "eg. •"
This gives me the following html output:
<div class="field">
<label for="user_Password">Password</label>
<input value="password" autocomplete="off" placeholder="eg. •" type="password" name="user[password]" id="user_password">
</div>
The input placeholder is actually displaying •
where I want it to show a bullet.
Any ideas on how I can get the placeholder to display the bullet instead?
I tried to reproduce the error on CodePen; however, it is working there: CodePen Example
I've also tried using another version of the encoding: •
which produced the same output.
Note - I'm using Rails 4.2.0 with the Slim template language.
Try using raw
:
= f.label "Password"
= f.password_field :password, autocomplete: "off",
placeholder: raw("•")