Skip to content

Commit 7493204

Browse files
[sanitizer-api] 各種更新
Dedupe defaults WICG/sanitizer-api@d4a6cff Don't allow comments and data-attributes when creating a default Sanitizer WICG/sanitizer-api@c7cb19f Set a configuration must correctly refer to sanitizer's config WICG/sanitizer-api@3cd0ca8
1 parent fd8429f commit 7493204

File tree

1 file changed

+34
-61
lines changed

1 file changed

+34
-61
lines changed

html-sanitizer-api-ja.html

+34-61
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@
110110

111111
●●options
112112

113-
spec_date:2025-03-20
114-
trans_update:2025-03-30
113+
spec_date:2025-04-10
114+
trans_update:2025-04-17
115115
source_checked:240321
116116
page_state_key:
117117
original_url:https://wicg.github.io/sanitizer-api/
@@ -225,6 +225,7 @@
225225
%B:-
226226
%準拠~HTML:compliantHTML
227227
%bool
228+
%~commentや~data属性を許容するか:allowCommentsAndDataAttributes
228229

229230
●構文
230231

@@ -1315,9 +1316,9 @@ <h3 title="SetHTML options and the configuration object.">2.2. `SetHTML^I ~optio
13151316
【この段は、この訳による補完。】
13161317
</li>
13171318
<li>
1318-
%妥当か ~LET `環境設定を設定する$( コレ, %configuration, 【ここに与えるべき引数が`指定されていない@https://github.com/WICG/sanitizer-api/issues/273$】 )
1319+
%妥当か ~LET `環境設定を設定する$( コレ, %configuration, ~T )
13191320
1320-
Let valid be the return value of setting configuration on this.
1321+
Let valid be the return value of set a configuration with configuration and true on this.
13211322
</li>
13221323
<li>
13231324
~IF[
@@ -1601,9 +1602,9 @@ <h2 title="Algorithms">3. ~algo</h2>
16011602
• Let sanitizer be a new Sanitizer instance.
16021603
</li>
16031604
<li>
1604-
%妥当か ~LET `環境設定を設定する$( %無毒化器, %無毒化器~指定, %安全か )
1605+
%妥当か ~LET `環境設定を設定する$( %無毒化器, %無毒化器~指定, ~IS[ %安全か ~EQ ~F ] )
16051606
1606-
• Let setConfigurationResult be the result of set a configuration with sanitizerSpec and safe on sanitizer.
1607+
• Let setConfigurationResult be the result of set a configuration with sanitizerSpec and not safe on sanitizer.
16071608
</li>
16081609
<li>
16091610
~IF[
@@ -2457,18 +2458,18 @@ <h3 title="Configuration Processing">3.2. 環境設定の処理-法</h3>
24572458
`環境設定を設定する@
24582459
~algoは、
24592460
所与の
2460-
( `Sanitizer$I %無毒化器, `辞書$ %~source環境設定, `真偽値$ %安全か )
2461+
( `Sanitizer$I %無毒化器, `辞書$ %~source環境設定, `真偽値$ %~commentや~data属性を許容するか )
24612462
に対し:
24622463
2463-
To set a configuration, given a dictionary configuration, a boolean safe, and a Sanitizer sanitizer:
2464+
To set a configuration, given a dictionary configuration, a boolean allowCommentsAndDataAttributes, and a Sanitizer sanitizer:
24642465
</p>
24652466
<ol>
24662467
<li>
24672468
%全部的な環境設定 ~LET %~source環境設定 の複製
24682469
</li>
24692470
<li>
24702471
<p>
2471-
`環境設定の欠落~memberを初期化する$( %全部的な環境設定, %安全か )
2472+
`環境設定の欠落~memberを初期化する$( %全部的な環境設定, %~commentや~data属性を許容するか )
24722473
</p>
24732474

24742475
<p class="trans-note">
@@ -2481,17 +2482,9 @@ <h3 title="Configuration Processing">3.2. 環境設定の処理-法</h3>
24812482
</p>
24822483
</li>
24832484
<li>
2484-
<p>
24852485
%環境設定 ~LET %無毒化器 の`環境設定$
2486-
</p>
2487-
2488-
<p class="trans-note">
2489-
この段は、
2490-
この訳による補完。
2491-
以下で呼出される各~algoにおいて %環境設定 ではなく %無毒化器 を渡しているが、
2492-
引数の型が合致していないので。
2493-
</p>
2494-
</li>
2486+
2487+
</li>
24952488
<li>
24962489
%全部的な環境設定[ "`elements$mb" ] を成す
24972490
~EACH( %要素 )
@@ -2500,7 +2493,7 @@ <h3 title="Configuration Processing">3.2. 環境設定の処理-法</h3>
25002493
`要素を許容するようにする$( %環境設定, %要素 )
25012494
25022495
For each element of configuration["elements"] do:
2503-
• Call allow an element with element and sanitizer.
2496+
• Call allow an element with element and sanitizer’s configuration.
25042497
</li>
25052498
<li>
25062499
%全部的な環境設定[ "`removeElements$mb" ] を成す
@@ -2510,7 +2503,7 @@ <h3 title="Configuration Processing">3.2. 環境設定の処理-法</h3>
25102503
`要素を除去するようにする$( %環境設定, %要素 )
25112504
25122505
For each element of configuration["removeElements"] do:
2513-
• Call remove an element with element and sanitizer.
2506+
• Call remove an element with element and sanitizer’s configuration.
25142507
</li>
25152508
<li>
25162509
%全部的な環境設定[ "`replaceWithChildrenElements$mb" ] を成す
@@ -2520,7 +2513,7 @@ <h3 title="Configuration Processing">3.2. 環境設定の処理-法</h3>
25202513
`要素をその子~群で置換するようにする$( %環境設定, %要素 )
25212514
25222515
For each element of configuration["replaceWithChildrenElements"] do:
2523-
• Call replace an element with its children with element and sanitizer.
2516+
• Call replace an element with its children with element and sanitizer’s configuration.
25242517
</li>
25252518
<li>
25262519
%全部的な環境設定[ "`attributes$mb" ] を成す
@@ -2530,7 +2523,7 @@ <h3 title="Configuration Processing">3.2. 環境設定の処理-法</h3>
25302523
`属性を許容するようにする$( %環境設定, %属性 )
25312524
25322525
For each attribute of configuration["attributes"] do:
2533-
• Call allow an attribute with attribute and sanitizer.
2526+
• Call allow an attribute with attribute and sanitizer’s configuration.
25342527
</li>
25352528
<li>
25362529
%全部的な環境設定[ "`removeAttributes$mb" ] を成す
@@ -2540,21 +2533,21 @@ <h3 title="Configuration Processing">3.2. 環境設定の処理-法</h3>
25402533
`属性を除去するようにする$( %環境設定, %属性 )
25412534
25422535
For each attribute of configuration["removeAttributes"] do:
2543-
• Call remove an attribute with attribute and sanitizer.
2536+
• Call remove an attribute with attribute and sanitizer’s configuration.
25442537
</li>
25452538
<li>
25462539
`~commentを許容するか否か設定する$( %環境設定, %全部的な環境設定[ "`comments$mb" ] )
25472540
25482541
If configuration["comments"] exists:
2549-
• Then call set comments with configuration["comments"] and sanitizer.
2550-
• Otherwise call set comments with not safe and sanitizer.
2542+
• Then call set comments with configuration["comments"] and sanitizer’s configuration.
2543+
• Otherwise call set comments with allowCommentsAndDataAttributes and sanitizer’s configuration.
25512544
</li>
25522545
<li>
25532546
`~data属性を許容するか否か設定する$( %環境設定, %全部的な環境設定[ "`dataAttributes$mb" ] )
25542547
25552548
If configuration["dataAttributes"] exists:
2556-
• Then call set data attributes with configuration["dataAttributes"] and sanitizer.
2557-
• Otherwise call set data attributes with not safe and sanitizer.
2549+
• Then call set data attributes with configuration["dataAttributes"] and sanitizer’s configuration.
2550+
• Otherwise call set data attributes with allowCommentsAndDataAttributes and sanitizer’s configuration.
25582551
</li>
25592552
<li>
25602553
<p>
@@ -2586,11 +2579,11 @@ <h3 title="Configuration Processing">3.2. 環境設定の処理-法</h3>
25862579
</ol>
25872580
25882581
Return whether all of the following are true:
2589-
• size of configuration["elements"] equals size of this’s configuration["elements"].
2590-
• size of configuration["removeElements"] equals size of this’s configuration["removeElements"].
2591-
• size of configuration["replaceWithChildrenElements"] equals size of this’s configuration["replaceWithChildrenElements"].
2592-
• size of configuration["attributes"] equals size of this’s configuration["attributes"].
2593-
• size of configuration["removeAttributes"] equals size of this’s configuration["removeAttributes"].
2582+
• size of configuration["elements"] equals size of sanitizer’s configuration["elements"].
2583+
• size of configuration["removeElements"] equals size of sanitizer’s configuration["removeElements"].
2584+
• size of configuration["replaceWithChildrenElements"] equals size of sanitizer’s configuration["replaceWithChildrenElements"].
2585+
• size of configuration["attributes"] equals size of sanitizer’s configuration["attributes"].
2586+
• size of configuration["removeAttributes"] equals size of sanitizer’s configuration["removeAttributes"].
25942587
</li>
25952588
<li>
25962589
<p>
@@ -2691,7 +2684,7 @@ <h3 title="Configuration Processing">3.2. 環境設定の処理-法</h3>
26912684
`環境設定の欠落~memberを初期化する@
26922685
~algoは、
26932686
所与の
2694-
( `SanitizerConfig$I %環境設定, `真偽値$ %安全か )
2687+
( `SanitizerConfig$I %環境設定, `真偽値$ %~commentや~data属性を許容するか )
26952688
に対し:
26962689
</p>
26972690
<ol>
@@ -2733,9 +2726,7 @@ <h3 title="Configuration Processing">3.2. 環境設定の処理-法</h3>
27332726
%環境設定[ %~key ] ~EQ ε
27342727
27352728
2736-
%環境設定[ %~key ] ~SET ~IS[
2737-
%安全か ~EQ ~F
2738-
2729+
%環境設定[ %~key ] ~SET %~commentや~data属性を許容するか
27392730
</li>
27402731
</ol>
27412732

@@ -3383,22 +3374,12 @@ <h3 title="Builtins">3.4. 組込みのもの</h3>
33833374
{
33843375
"name": "dfn",
33853376
"namespace": %HTMLNS,
3386-
"attributes": [
3387-
{
3388-
"name": "title",
3389-
"namespace": null
3390-
}
3391-
]
3377+
"attributes": []
33923378
},
33933379
{
33943380
"name": "abbr",
33953381
"namespace": %HTMLNS,
3396-
"attributes": [
3397-
{
3398-
"name": "title",
3399-
"namespace": null
3400-
}
3401-
]
3382+
"attributes": []
34023383
},
34033384
{
34043385
"name": "ruby",
@@ -3488,22 +3469,12 @@ <h3 title="Builtins">3.4. 組込みのもの</h3>
34883469
{
34893470
"name": "bdi",
34903471
"namespace": %HTMLNS,
3491-
"attributes": [
3492-
{
3493-
"name": "dir",
3494-
"namespace": null
3495-
}
3496-
]
3472+
"attributes": []
34973473
},
34983474
{
34993475
"name": "bdo",
35003476
"namespace": %HTMLNS,
3501-
"attributes": [
3502-
{
3503-
"name": "dir",
3504-
"namespace": null
3505-
}
3506-
]
3477+
"attributes": []
35073478
},
35083479
{
35093480
"name": "span",
@@ -3919,6 +3890,8 @@ <h3 title="Builtins">3.4. 組込みのもの</h3>
39193890
"namespace": null
39203891
}
39213892
]
3893+
"comments": false,
3894+
"dataAttributes": false
39223895
}
39233896
</pre>
39243897

0 commit comments

Comments
 (0)