text: /*!
   * UI development toolkit for HTML5 (OpenUI5)
   * (c) Copyright 2009-2017 SAP SE or an SAP affiliate company.
   * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
   */
  sap.ui.define(['jquery.sap.global','./library','sap/ui/core/Control','./FormattedTextAnchorGenerator'],function(q,l,C,F){"use strict";var a=C.extend("sap.m.FormattedText",{metadata:{library:"sap.m",properties:{htmlText:{type:"string",group:"Misc",defaultValue:""},width:{type:"sap.ui.core.CSSSize",group:"Appearance",defaultValue:null},convertLinksToAnchorTags:{type:"sap.m.LinkConversion",group:"Behavior",defaultValue:sap.m.LinkConversion.None},convertedLinksDefaultTarget:{type:"string",group:"Behavior",defaultValue:"_blank"},height:{type:"sap.ui.core.CSSSize",group:"Appearance",defaultValue:null}}}});var _={ATTRIBS:{'style':1,'class':1,'a::href':1,'a::target':1},ELEMENTS:{'a':{cssClass:'sapMLnk'},'abbr':1,'blockquote':1,'br':1,'cite':1,'code':1,'em':1,'h1':{cssClass:'sapMTitle sapMTitleStyleH1'},'h2':{cssClass:'sapMTitle sapMTitleStyleH2'},'h3':{cssClass:'sapMTitle sapMTitleStyleH3'},'h4':{cssClass:'sapMTitle sapMTitleStyleH4'},'h5':{cssClass:'sapMTitle sapMTitleStyleH5'},'h6':{cssClass:'sapMTitle sapMTitleStyleH6'},'p':1,'pre':1,'strong':1,'span':1,'u':1,'dl':1,'dt':1,'dd':1,'ol':1,'ul':1,'li':1}},b={ATTRIBS:{'a::href':1,'a::target':1},ELEMENTS:{'a':{cssClass:'sapMLnk'},'em':1,'strong':1,'u':1}},c=_;a.prototype.init=function(){};function s(t,e){var w;var f,v,g=t==="a";var h=c.ELEMENTS[t].cssClass||"";for(var i=0;i<e.length;i+=2){f=e[i];v=e[i+1];if(!c.ATTRIBS[f]&&!c.ATTRIBS[t+"::"+f]){w='FormattedText: <'+t+'> with attribute ['+f+'="'+v+'"] is not allowed';q.sap.log.warning(w,this);e[i+1]=null;continue;}if(f=="href"){if(!q.sap.validateUrl(v)){q.sap.log.warning("FormattedText: incorrect href attribute:"+v,this);e[i+1]="#";g=false;}}if(f=="target"){g=false;}if(h&&f.toLowerCase()=="class"){e[i+1]=h+" "+v;h="";}}if(g){e.push("target");e.push("_blank");}if(h){e.push("class");e.push(h);}return e;}function p(t,e){if(c.ELEMENTS[t]){return s(t,e);}else{var w='<'+t+'> is not allowed';q.sap.log.warning(w,this);}}function d(t){return q.sap._sanitizeHTML(t,{tagPolicy:p,uriRewriter:function(u){if(q.sap.validateUrl(u)){return u;}}});}function o(e){var n=window.open();n.opener=null;n.location=e.currentTarget.href;e.preventDefault();}a.prototype.onAfterRendering=function(){this.$().find('a[target="_blank"]').on("click",o);};a.prototype._getDisplayHtml=function(){var t=this.getHtmlText(),A=this.getConvertLinksToAnchorTags();if(A===l.LinkConversion.None){return t;}t=F.generateAnchors(t,A,this.getConvertedLinksDefaultTarget());return d(t);};a.prototype.setHtmlText=function(t){return this.setProperty("htmlText",d(t));};a.prototype._setUseLimitedRenderingRules=function(L){c=L?b:_;};return a;},true);
  