move Ox.stripTags from String.js to HTML.js

This commit is contained in:
rolux 2012-06-18 19:11:17 +02:00
parent 1ab5c5eca1
commit 996f41c06b
2 changed files with 9 additions and 9 deletions

View file

@ -507,4 +507,13 @@
return Ox.normalizeHTML(html);
};
/*@
Ox.stripTags <f> Strips HTML tags from a string
> Ox.stripTags('f<span>o</span>o')
'foo'
@*/
Ox.stripTags = function(string) {
return string.replace(/<.*?>/g, '');
};
}());

View file

@ -415,15 +415,6 @@ Ox.startsWith = function(string, substring) {
return string.slice(0, substring.length) == substring;
};
/*@
Ox.stripTags <f> Strips HTML tags from a string
> Ox.stripTags('f<span>o</span>o')
'foo'
@*/
Ox.stripTags = function(string) {
return string.replace(/<.*?>/g, '');
};
/*@
Ox.toCamelCase <f> Takes a string with '-', '/' or '_', returns a camelCase string
> Ox.toCamelCase('foo-bar-baz')