File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 1- ## v2.0.0-dev
1+ ## v2.1.0
22 * Remove custom HTML rendering logic in favor of logic from ` package:html ` .
33 * Added ` topics ` to ` pubspec.yaml ` .
4+ * ` rel ` attributes added through ` addLinkRel ` are appended to existing ones.
45
56## v2.0.0
67 * Migrate to null safety.
Original file line number Diff line number Diff line change @@ -249,7 +249,12 @@ class SaneHtmlValidator {
249249 if (href != null && addLinkRel != null ) {
250250 final rels = addLinkRel !(href);
251251 if (rels != null && rels.isNotEmpty) {
252- node.attributes['rel' ] = rels.join (' ' );
252+ final currentRel = node.attributes['rel' ] ?? '' ;
253+ final allRels = < String > {
254+ ...currentRel.split (' ' ).where ((e) => e.isNotEmpty),
255+ ...rels,
256+ };
257+ node.attributes['rel' ] = allRels.join (' ' );
253258 }
254259 }
255260 }
Original file line number Diff line number Diff line change 11name : sanitize_html
2- version : 2.0.0-dev
2+ version : 2.1.0
33description : >-
44 Function for sanitizing HTML to prevent XSS by restrict elements and
55 attributes to a safe subset of allowed values.
@@ -14,7 +14,7 @@ dependencies:
1414 meta : ^1.1.7
1515dev_dependencies :
1616 test : ^1.5.1
17- lints : ^1 .0.0
18- markdown : ^4.0.0
17+ lints : ^2 .0.0
18+ markdown : ^7.1.1
1919environment :
20- sdk : ' >=2.12.0 <3 .0.0'
20+ sdk : ' >=2.12.0 <4 .0.0'
You can’t perform that action at this time.
0 commit comments