smart quote adding; content wrap handling; canonicalization helper method