Skip to content

Html Tags White list #106

Closed
Closed
@MadeNade

Description

@MadeNade

I work with advanced method:

$gump = new GUMP();

$_POST = $gump->sanitize($_POST); // You don't have to sanitize, but it's safest to do so.

$gump->validation_rules(array(
    'title'      => 'required',
    'story'      => 'required'

));

$gump->filter_rules(array(
    'title'    => 'trim|sanitize_string',
    'story'    => 'trim|sanitize_string',
));

$validated_data = $gump->run($_POST);

if($validated_data === false) {
    echo $gump->get_readable_errors(true);
} else {
    print_r($validated_data); // validation successful
}

In action this good work and sanitize all input data. for story field in need to add html tags like <p><img><table> but this class sanitize all $_POST and remove all html tags.

how do can i add white list for html tags?!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions