module CrystalGauntlet::Clean

Overview

utilities to prevent malicious user input

Extended Modules

Defined in:

lib/clean.cr

Instance Method Summary

Instance Method Detail

def clean_b64(str) #

for b64 inputs; thoroughly cleans them


[View source]
def clean_basic(str) #

only allow "basic" characters (roughly printable ascii, excluding format-breaking chars)


[View source]
def clean_char(str) #

only allow alphanumeric chars & space


[View source]
def clean_number(str) #

only allows numbers


[View source]
def clean_special(str : String) #

for descriptions & similar


[View source]