To support host patterns string should be properly escaped.

Without this records with special characters in host name (* for example) are duplicated.