devBanner / devBanner_Frontend

Responsive web page for devBanner (WEB)
https://devbanner.center
Apache License 2.0
10 stars 8 forks source link

Only allow specific characters in subtext #29

Closed cozyplanes closed 6 years ago

cozyplanes commented 6 years ago

Is there a way to prevent creating the banner when any character not included in Comfortaa is being used? This are the characters included in Comfortaa:

A​‌B​‌C​‌Č​‌Ć​‌D​‌Đ​‌E​‌F​‌G​‌H​‌I​‌J​‌K​‌L​‌M​‌N​‌O​‌P​‌Q​‌R​‌S​‌Š​‌T​‌U​‌V​‌W​‌X​‌Y​‌Z​‌Ž​‌a​‌b​‌c​‌č​‌ć​‌d​‌đ​‌e​‌f​‌g​‌h​‌i​‌j​‌k​‌l​‌m​‌n​‌o​‌p​‌q​‌r​‌s​‌š​‌t​‌u​‌v​‌w​‌x​‌y​‌z​‌ž​‌А​‌Б​‌В​‌Г​‌Ґ​‌Д​‌Ђ​‌Е​‌Ё​‌Є​‌Ж​‌З​‌Ѕ​‌И​‌І​‌Ї​‌Й​‌Ј​‌К​‌Л​‌Љ​‌М​‌Н​‌Њ​‌О​‌П​‌Р​‌С​‌Т​‌Ћ​‌У​‌Ў​‌Ф​‌Х​‌Ц​‌Ч​‌Џ​‌Ш​‌Щ​‌Ъ​‌Ы​‌Ь​‌Э​‌Ю​‌Я​‌а​‌б​‌в​‌г​‌ґ​‌д​‌ђ​‌е​‌ё​‌є​‌ж​‌з​‌ѕ​‌и​‌і​‌ї​‌й​‌ј​‌к​‌л​‌љ​‌м​‌н​‌њ​‌о​‌п​‌р​‌с​‌т​‌ћ​‌у​‌ў​‌ф​‌х​‌ц​‌ч​‌џ​‌ш​‌щ​‌ъ​‌ы​‌ь​‌э​‌ю​‌я​‌Α​‌Β​‌Γ​‌Δ​‌Ε​‌Ζ​‌Η​‌Θ​‌Ι​‌Κ​‌Λ​‌Μ​‌Ν​‌Ξ​‌Ο​‌Π​‌Ρ​‌Σ​‌Τ​‌Υ​‌Φ​‌Χ​‌Ψ​‌Ω​‌α​‌β​‌γ​‌δ​‌ε​‌ζ​‌η​‌θ​‌ι​‌κ​‌λ​‌μ​‌ν​‌ξ​‌ο​‌π​‌ρ​‌σ​‌τ​‌υ​‌φ​‌χ​‌ψ​‌ω​‌Ă​‌Â​‌Ê​‌Ô​‌Ơ​‌Ư​‌ă​‌â​‌ê​‌ô​‌ơ​‌ư​‌1​‌2​‌3​‌4​‌5​‌6​‌7​‌8​‌9​‌0​‌‘​‌?​‌’​‌“​‌!​‌”​‌(​‌%​‌)​‌[​‌#​‌]​‌{​‌@​‌}​‌/​‌&​‌\​‌<​‌-​‌+​‌÷​‌×​‌=​‌>​‌®​‌©​‌$​‌€​‌£​‌¥​‌¢​‌:​‌;​‌,​‌.​‌*

If this isn't possible in the html / js , I should implement somehow in the backend

@Skayo @Kimmax

Kimmax commented 6 years ago

Yes there is, but 1) why 2) why alphanumeric characters?

cozyplanes commented 6 years ago

Thats the only characters supported by comfortaa

Others become that question mark in tofu

Kimmax commented 6 years ago

Is there a way to prevent creating banners when the following characters is written in subtext?

cozyplanes commented 6 years ago

So in frontend, when unsupported character is typed in the subtext input field, show some error by js maybe, and when there is an unsupported character sent to the api directly, throw exception

cozyplanes commented 6 years ago

Or did i understood wrong?

jonasgeiler commented 6 years ago

So front and back-end?

jonasgeiler commented 6 years ago

I could do a little front-end check and display it like the user not found error. But it should be done in the back-end too!

Kimmax commented 6 years ago

Yeah @CozyPlanes basically said throw an error if the characters listed are in the text Whatever I would say we allow alphanumeric, point, comma and (), don't really need more in my opinion Catch these client side, I'll do on the backend

jonasgeiler commented 6 years ago

But there are some that do actually work. Like the nums and punctuation marks.