You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
we noticed, that Angular's Sanitize doesn't treat certain SVG attributes properly. SVG allows for camel-cased attribute names. Some of them are white-listed:
// SVG attributes (without "id" and "name" attributes)// https://wiki.whatwg.org/wiki/Sanitization_rules#svg_AttributesvarsvgAttrs=makeMap('accent-height,accumulate,additive,alphabetic,arabic-form,ascent,'+'attributeName,attributeType,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,'+'color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,'+'font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,'+'gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,'+'keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,'+'markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,'+'overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,'+'repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,'+'stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,'+'stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,'+'stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,'+'underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,'+'viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,'+'xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,'+'zoomAndPan');
The code however converts attribute names to lower-case, thereby removes attributes that are on the white-list. We consider that a bug.
cure53
changed the title
ngSanitize: camel-cased atributes in SVG accidentally deleted
ngSanitize: camel-cased attributes in SVG accidentally deleted
Feb 25, 2015
netman92
pushed a commit
to netman92/angular.js
that referenced
this issue
Aug 8, 2015
Hi all,
we noticed, that Angular's Sanitize doesn't treat certain SVG attributes properly. SVG allows for camel-cased attribute names. Some of them are white-listed:
The code however converts attribute names to lower-case, thereby removes attributes that are on the white-list. We consider that a bug.
A fix would be to lower-case both white-listed and checked attributes to normalize and solve the problem.
The text was updated successfully, but these errors were encountered: