JBIDE-17818 Visual Editor: Need to handle external html / htm files

fixed bug for external file opened with wtp editor + html preview
Anyway, this public static method is not a big deal and should not break any user's code. So +1 to push it to 4.2.x branch.