added trim to key and value of attr replace
Merge branch 'master' of https://github.com/matthewlsawyer/tophat