/usr/share/javascript/angular.js/angular-sanitize.min.js is in libjs-angularjs 1.2.11-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 | /**
* @license AngularJS v1.2.11
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/(function(e,t,n){"use strict";function i(){this.$get=["$$sanitizeUri",function(e){return function(t){var n=[];return C(t,M(n,function(t,n){return!/^unsafe/.test(e(t,n))})),n.join("")}}]}function s(e){var n=[],r=M(n,t.noop);return r.chars(e),n.join("")}function N(e){var t={},n=e.split(","),r;for(r=0;r<n.length;r++)t[n[r]]=!0;return t}function C(e,n){function x(e,r,i,s){r=t.lowercase(r);if(b[r])while(m.last()&&w[m.last()])T("",m.last());y[r]&&m.last()==r&&T("",r),s=v[r]||!!s,s||m.push(r);var o={};i.replace(a,function(e,t,n,r,i){var s=n||r||i||"";o[t]=A(s)}),n.start&&n.start(r,o,s)}function T(e,r){var i=0,s;r=t.lowercase(r);if(r)for(i=m.length-1;i>=0;i--)if(m[i]==r)break;if(i>=0){for(s=m.length-1;s>=i;s--)n.end&&n.end(m[s]);m.length=i}}var i,s,d,m=[],g=e;m.last=function(){return m[m.length-1]};while(e){s=!0;if(!m.last()||!E[m.last()]){e.indexOf("<!--")===0?(i=e.indexOf("--",4),i>=0&&e.lastIndexOf("-->",i)===i&&(n.comment&&n.comment(e.substring(4,i)),e=e.substring(i+3),s=!1)):h.test(e)?(d=e.match(h),d&&(e=e.replace(d[0],""),s=!1)):l.test(e)?(d=e.match(u),d&&(e=e.substring(d[0].length),d[0].replace(u,T),s=!1)):f.test(e)&&(d=e.match(o),d&&(e=e.substring(d[0].length),d[0].replace(o,x),s=!1));if(s){i=e.indexOf("<");var S=i<0?e:e.substring(0,i);e=i<0?"":e.substring(i),n.chars&&n.chars(A(S))}}else e=e.replace(new RegExp("(.*)<\\s*\\/\\s*"+m.last()+"[^>]*>","i"),function(e,t){return t=t.replace(c,"$1").replace(p,"$1"),n.chars&&n.chars(A(t)),""}),T("",m.last());if(e==g)throw r("badparse","The sanitizer was unable to parse the following block of html: {0}",e);g=e}T()}function A(e){if(!e)return"";var t=L.exec(e),n=t[1],r=t[3],i=t[2];return i&&(k.innerHTML=i.replace(/</g,"<"),i="textContent"in k?k.textContent:k.innerText),n+i+r}function O(e){return e.replace(/&/g,"&").replace(d,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function M(e,n){var r=!1,i=t.bind(e,e.push);return{start:function(e,s,o){e=t.lowercase(e),!r&&E[e]&&(r=e),!r&&S[e]===!0&&(i("<"),i(e),t.forEach(s,function(r,s){var o=t.lowercase(s),u=e==="img"&&o==="src"||o==="background";T[o]===!0&&(x[o]!==!0||n(r,u))&&(i(" "),i(s),i('="'),i(O(r)),i('"'))}),i(o?"/>":">"))},end:function(e){e=t.lowercase(e),!r&&S[e]===!0&&(i("</"),i(e),i(">")),e==r&&(r=!1)},chars:function(e){r||i(O(e))}}}var r=t.$$minErr("$sanitize"),o=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,u=/^<\s*\/\s*([\w:-]+)[^>]*>/,a=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,f=/^</,l=/^<\s*\//,c=/<!--(.*?)-->/g,h=/<!DOCTYPE([^>]*?)>/i,p=/<!\[CDATA\[(.*?)]]>/g,d=/([^\#-~| |!])/g,v=N("area,br,col,hr,img,wbr"),m=N("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),g=N("rp,rt"),y=t.extend({},g,m),b=t.extend({},m,N("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),w=t.extend({},g,N("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),E=N("script,style"),S=t.extend({},v,b,w,y),x=N("background,cite,href,longdesc,src,usemap"),T=t.extend({},x,N("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width")),k=document.createElement("pre"),L=/^(\s*)([\s\S]*?)(\s*)$/;t.module("ngSanitize",[]).provider("$sanitize",i),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>]/,r=/^mailto:/;return function(i,o){function h(e){if(!e)return;f.push(s(e))}function p(e,n){f.push("<a "),t.isDefined(o)&&(f.push('target="'),f.push(o),f.push('" ')),f.push('href="'),f.push(e),f.push('">'),h(n),f.push("</a>")}if(!i)return i;var u,a=i,f=[],l,c;while(u=a.match(n))l=u[0],u[2]==u[3]&&(l="mailto:"+l),c=u.index,h(a.substr(0,c)),p(l,u[0].replace(r,"")),a=a.substring(c+u[0].length);return h(a),e(f.join(""))}}])})(window,window.angular);
|