aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngSanitize
diff options
context:
space:
mode:
authorPeter Bacon Darwin2014-02-07 20:34:04 +0000
committerPeter Bacon Darwin2014-02-16 19:03:40 +0000
commit1192ae44f1d7f944719520f235e9f2ec895bdfd5 (patch)
tree4d4f06b9448731e2b34ddd2441a0a13dccfc8301 /src/ngSanitize
parentf7c8bcb329eb77b153cd91fcf35c5874a6f9a4b3 (diff)
downloadangular.js-1192ae44f1d7f944719520f235e9f2ec895bdfd5.tar.bz2
docs(bike-shed-migration): convert <doc:...> examples to <example>...
Diffstat (limited to 'src/ngSanitize')
-rw-r--r--src/ngSanitize/filter/linky.js12
-rw-r--r--src/ngSanitize/sanitize.js12
2 files changed, 12 insertions, 12 deletions
diff --git a/src/ngSanitize/filter/linky.js b/src/ngSanitize/filter/linky.js
index 43019f33..666cd9d5 100644
--- a/src/ngSanitize/filter/linky.js
+++ b/src/ngSanitize/filter/linky.js
@@ -21,8 +21,8 @@
<span ng-bind-html="linky_expression | linky"></span>
*
* @example
- <doc:example module="ngSanitize">
- <doc:source>
+ <example module="ngSanitize">
+ <file name="index.html">
<script>
function Ctrl($scope) {
$scope.snippet =
@@ -66,8 +66,8 @@
<td><div ng-bind="snippet"></div></td>
</tr>
</table>
- </doc:source>
- <doc:protractor>
+ </file>
+ </file name="protractor.js" type="protractor">
it('should linkify the snippet with urls', function() {
expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).
toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' +
@@ -98,8 +98,8 @@
toBe('http://angularjs.org/');
expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank');
});
- </doc:protractor>
- </doc:example>
+ </file>
+ </example>
*/
angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {
var LINKY_URL_REGEXP =
diff --git a/src/ngSanitize/sanitize.js b/src/ngSanitize/sanitize.js
index 6b1e99ea..c67ee976 100644
--- a/src/ngSanitize/sanitize.js
+++ b/src/ngSanitize/sanitize.js
@@ -53,8 +53,8 @@ var $sanitizeMinErr = angular.$$minErr('$sanitize');
* @returns {string} Sanitized html.
*
* @example
- <doc:example module="ngSanitize">
- <doc:source>
+ <example module="ngSanitize">
+ <file name="index.html">
<script>
function Ctrl($scope, $sce) {
$scope.snippet =
@@ -98,8 +98,8 @@ var $sanitizeMinErr = angular.$$minErr('$sanitize');
</tr>
</table>
</div>
- </doc:source>
- <doc:protractor>
+ </file>
+ </file name="protractor.js" type="protractor">
it('should sanitize the html snippet by default', function() {
expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).
toBe('<p>an html\n<em>click here</em>\nsnippet</p>');
@@ -129,8 +129,8 @@ var $sanitizeMinErr = angular.$$minErr('$sanitize');
expect(element(by.css('#bind-default div')).getInnerHtml()).toBe(
"new &lt;b onclick=\"alert(1)\"&gt;text&lt;/b&gt;");
});
- </doc:protractor>
- </doc:example>
+ </file>
+ </example>
*/
function $SanitizeProvider() {
this.$get = ['$$sanitizeUri', function($$sanitizeUri) {