'use strict';
angular.module('cm.services')
  .factory('dom', function() {
    var getTagClass = function(tag) {
      return tag.className;
    }

    var setUniqueClass = function(tag, pattern, c) {
      var regex = new RegExp('(^|\s)' + tag + '-\S+', 'g');
      var strippedClass = document.body.className.replace(regex, '');
      document.body.className = strippedClass + ' ' + pattern + '-' + c;
      return true;
    }

    return {
      setUniqueClass: setUniqueClass
    }
  });

@@ -204,16 +204,44 @@
     var 
+regex, strippedClass;%0A      
 regex = 
@@ -260,23 +260,29 @@
 (%5E%7C%5C
+%5C
 s)' + 
-tag
+pattern
  + '-%5C
+%5C
 S+',
@@ -294,20 +294,16 @@
 ;%0A      
-var 
 stripped

Fix setUniqueClass RegExp