File tree 3 files changed +12
-6
lines changed
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
2
2
* Remove custom HTML rendering logic in favor of logic from ` package:html ` .
3
3
* Added ` topics ` to ` pubspec.yaml ` .
4
+ * ` rel ` attributes added through ` addLinkRel ` are appended to existing ones.
4
5
5
6
## v2.0.0
6
7
* Migrate to null safety.
Original file line number Diff line number Diff line change @@ -249,7 +249,12 @@ class SaneHtmlValidator {
249
249
if (href != null && addLinkRel != null ) {
250
250
final rels = addLinkRel !(href);
251
251
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 (' ' );
253
258
}
254
259
}
255
260
}
Original file line number Diff line number Diff line change 1
1
name : sanitize_html
2
- version : 2.0.0-dev
2
+ version : 2.1.0
3
3
description : >-
4
4
Function for sanitizing HTML to prevent XSS by restrict elements and
5
5
attributes to a safe subset of allowed values.
@@ -14,7 +14,7 @@ dependencies:
14
14
meta : ^1.1.7
15
15
dev_dependencies :
16
16
test : ^1.5.1
17
- lints : ^1 .0.0
18
- markdown : ^4.0.0
17
+ lints : ^2 .0.0
18
+ markdown : ^7.1.1
19
19
environment :
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