From 024881dbd3f5da971b92cae160db95083f04bdce Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Mon, 13 Sep 2021 22:39:04 +0200 Subject: [PATCH] Add email addresses to contacts menu Signed-off-by: Daniel Kesselberg --- core/js/dist/login.js | 2 +- core/js/dist/login.js.map | 2 +- core/js/dist/main.js | 2 +- core/js/dist/main.js.map | 2 +- core/src/OC/contactsmenu/contact.handlebars | 1 + lib/private/Contacts/ContactsMenu/Entry.php | 1 + tests/lib/Contacts/ContactsMenu/EntryTest.php | 4 +++- 7 files changed, 9 insertions(+), 5 deletions(-) diff --git a/core/js/dist/login.js b/core/js/dist/login.js index 6871516458e5a..8adeff116ad0f 100644 --- a/core/js/dist/login.js +++ b/core/js/dist/login.js @@ -583,7 +583,7 @@ e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月 //! moment.js locale configuration e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(2))},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,a=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(a.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(a.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(475),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(18))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,a,i,o,s,u=1,l={},c=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){m(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){m(e.data)},r=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(a=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){m(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):r=function(e){setTimeout(m,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&m(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(o+t,"*")}),f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1?n-1:0),a=1;a/gm),F=o(/^data-[\-\w.\u00B7-\uFFFF]/),R=o(/^aria-[\-\w]+$/),U=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),W=o(/^(?:\w+script|data):/i),z=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function B(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:G(),n=function(t){return e(t)};if(n.version="2.3.1",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,a=t.document,o=t.DocumentFragment,s=t.HTMLTemplateElement,u=t.Node,l=t.Element,c=t.NodeFilter,d=t.NamedNodeMap,b=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,V=t.Text,J=t.Comment,K=t.DOMParser,X=t.trustedTypes,Z=l.prototype,Q=k(Z,"cloneNode"),ee=k(Z,"nextSibling"),te=k(Z,"childNodes"),ne=k(Z,"parentNode");if("function"==typeof s){var re=a.createElement("template");re.content&&re.content.ownerDocument&&(a=re.content.ownerDocument)}var ae=q(X,r),ie=ae&&Ne?ae.createHTML(""):"",oe=a,se=oe.implementation,ue=oe.createNodeIterator,le=oe.createDocumentFragment,ce=oe.getElementsByTagName,de=r.importNode,fe={};try{fe=T(a).documentMode?a.documentMode:{}}catch(e){}var pe={};n.isSupported="function"==typeof ne&&se&&void 0!==se.createHTMLDocument&&9!==fe;var me=N,he=I,_e=F,ye=R,ge=W,ve=z,Me=U,Le=null,be=w({},[].concat(B(x),B(Y),B(D),B(E),B(A))),we=null,Te=w({},[].concat(B(O),B(P),B(C),B(H))),ke=null,xe=null,Ye=!0,De=!0,Se=!1,Ee=!1,je=!1,Ae=!1,Oe=!1,Pe=!1,Ce=!1,He=!0,Ne=!1,Ie=!0,Fe=!0,Re=!1,Ue={},We=null,ze=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),$e=null,Be=w({},["audio","video","img","source","image","track"]),Ge=null,qe=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml",Xe=Ke,Ze=!1,Qe=null,et=a.createElement("form"),tt=function(e){Qe&&Qe===e||(e&&"object"===(void 0===e?"undefined":$(e))||(e={}),e=T(e),Le="ALLOWED_TAGS"in e?w({},e.ALLOWED_TAGS):be,we="ALLOWED_ATTR"in e?w({},e.ALLOWED_ATTR):Te,Ge="ADD_URI_SAFE_ATTR"in e?w(T(qe),e.ADD_URI_SAFE_ATTR):qe,$e="ADD_DATA_URI_TAGS"in e?w(T(Be),e.ADD_DATA_URI_TAGS):Be,We="FORBID_CONTENTS"in e?w({},e.FORBID_CONTENTS):ze,ke="FORBID_TAGS"in e?w({},e.FORBID_TAGS):{},xe="FORBID_ATTR"in e?w({},e.FORBID_ATTR):{},Ue="USE_PROFILES"in e&&e.USE_PROFILES,Ye=!1!==e.ALLOW_ARIA_ATTR,De=!1!==e.ALLOW_DATA_ATTR,Se=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ee=e.SAFE_FOR_TEMPLATES||!1,je=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,Ce=e.RETURN_DOM_FRAGMENT||!1,He=!1!==e.RETURN_DOM_IMPORT,Ne=e.RETURN_TRUSTED_TYPE||!1,Oe=e.FORCE_BODY||!1,Ie=!1!==e.SANITIZE_DOM,Fe=!1!==e.KEEP_CONTENT,Re=e.IN_PLACE||!1,Me=e.ALLOWED_URI_REGEXP||Me,Xe=e.NAMESPACE||Ke,Ee&&(De=!1),Ce&&(Pe=!0),Ue&&(Le=w({},[].concat(B(A))),we=[],!0===Ue.html&&(w(Le,x),w(we,O)),!0===Ue.svg&&(w(Le,Y),w(we,P),w(we,H)),!0===Ue.svgFilters&&(w(Le,D),w(we,P),w(we,H)),!0===Ue.mathMl&&(w(Le,E),w(we,C),w(we,H))),e.ADD_TAGS&&(Le===be&&(Le=T(Le)),w(Le,e.ADD_TAGS)),e.ADD_ATTR&&(we===Te&&(we=T(we)),w(we,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&w(Ge,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(We===ze&&(We=T(We)),w(We,e.FORBID_CONTENTS)),Fe&&(Le["#text"]=!0),je&&w(Le,["html","head","body"]),Le.table&&(w(Le,["tbody"]),delete ke.tbody),i&&i(e),Qe=e)},nt=w({},["mi","mo","mn","ms","mtext"]),rt=w({},["foreignobject","desc","title","annotation-xml"]),at=w({},Y);w(at,D),w(at,S);var it=w({},E);w(it,j);var ot=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:Ke,tagName:"template"});var n=h(e.tagName),r=h(t.tagName);if(e.namespaceURI===Je)return t.namespaceURI===Ke?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===r||nt[r]):Boolean(at[n]);if(e.namespaceURI===Ve)return t.namespaceURI===Ke?"math"===n:t.namespaceURI===Je?"math"===n&&rt[r]:Boolean(it[n]);if(e.namespaceURI===Ke){if(t.namespaceURI===Je&&!rt[r])return!1;if(t.namespaceURI===Ve&&!nt[r])return!1;var a=w({},["title","style","font","a","script"]);return!it[n]&&(a[n]||!at[n])}return!1},st=function(e){m(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ie}catch(t){e.remove()}}},ut=function(e,t){try{m(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!we[e])if(Pe||Ce)try{st(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},lt=function(e){var t=void 0,n=void 0;if(Oe)e=""+e;else{var r=_(e,/^[\r\n\t ]+/);n=r&&r[0]}var i=ae?ae.createHTML(e):e;if(Xe===Ke)try{t=(new K).parseFromString(i,"text/html")}catch(e){}if(!t||!t.documentElement){t=se.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=Ze?"":i}catch(e){}}var o=t.body||t.documentElement;return e&&n&&o.insertBefore(a.createTextNode(n),o.childNodes[0]||null),Xe===Ke?ce.call(t,je?"html":"body")[0]:je?t.documentElement:o},ct=function(e){return ue.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},dt=function(e){return!(e instanceof V||e instanceof J||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof b&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},ft=function(e){return"object"===(void 0===u?"undefined":$(u))?e instanceof u:e&&"object"===(void 0===e?"undefined":$(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},pt=function(e,t,r){pe[e]&&f(pe[e],(function(e){e.call(n,t,r,Qe)}))},mt=function(e){var t=void 0;if(pt("beforeSanitizeElements",e,null),dt(e))return st(e),!0;if(_(e.nodeName,/[\u0080-\uFFFF]/))return st(e),!0;var r=h(e.nodeName);if(pt("uponSanitizeElement",e,{tagName:r,allowedTags:Le}),!ft(e.firstElementChild)&&(!ft(e.content)||!ft(e.content.firstElementChild))&&M(/<[/\w]/g,e.innerHTML)&&M(/<[/\w]/g,e.textContent))return st(e),!0;if("select"===r&&M(/