new extended helper encode/escape logic, fix php warning
Merge pull request #31 from zordius/helper_escape_logic

new extended helper encode/escape logic, fix php warning