Custom attribute with leading space

I’m using the jQuery plugin Form Validator. For that an input has a custom attribute:

Name: data-sanitize-insert-right
Value:  Uhr – see the leading whitespace here!

On publishing the site, webflow trims the leading whitespace and it becomes to <input … data-sanitize-insert-right=“Uhr”> instead of <input … data-sanitize-insert-right=" Uhr">.

Is there any way to prevent webflow doing this?

Hey @Nine,

Maybe try using the html entity: &#32; ?

Unfortunately not. The entity is displayed as &#32; and not converted to a space :frowning:

can you share a read-only link?

https://preview.webflow.com/preview/amv?utm_source=amv&preview=fdb6ef490973f6e3fbf1b9479e8b353d > page “Event erfassen” | input #Agenda-Zeit

Can you try Shift + Space

Shift + Space does not help :frowning:

I can of course replace the “input” with an “HTML embed” – but that’s just a workaround and not webflow like :wink:

That’s a bummer :frowning_face:
maybe @QA_Brandon or @PixelGeek will have a solution?

Try this (set by JS)

copy-paste before body

<script>
   $('#Agenda-Zeit').attr("data-sanitize-insert-right", " Uhr");
</script>

Should work fine (The change happens after the page loads).

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.