Detect parsing method from while list

The white list could protect us from injection attacking.

@lepture Please review it. Thanks.