Better modx_sanitize_gpc - 3rd try

In the old version, MODX tags separated in two GPC keys and values were not sanitized. But if they are shown in the right order, the tags are evaluated by the parser.

Rewritten/modified the code from the japanese community.

Tags are converted into hexadecimal entities in GPC keys and values for following reason: i.e. [<​b​>[ code is not sanitized but after a strip_tags it would be a valid MODX tag. If someone really needs that chars, they should be translated back from hexadecimal entities in snippet or plugin code.