Site icon Osclass Documentation & Knowledge Base

hSanitize.php

osc_sanitize_url($value) – Sanitize a website URL

osc_sanitize_name($value) – Sanitize capitalization for a string. Capitalize first letter of each name. If all-caps, remove all-caps.

osc_sanitize_allcaps($value) – Sanitize string that’s all-caps

osc_sanitize_int($value) – Sanitize number (with no periods)

osc_sanitize_phone($value) – Format phone number. Supports 10-digit with extensions, and defaults to international if cannot match US number.

osc_esc_html($str = ) – Escape html

osc_esc_js($str) – Escape single quotes, double quotes, <, >, & and line endings