Javascript's default replace works only 1 time, for Replace All check out this page. http://www.bradino.com/javascript/string-replace/ #js