UNPKG

16.9 kBPlain TextView Raw
1DOMPurify
2Copyright 2015 Mario Heiderich
3
4DOMPurify is free software; you can redistribute it and/or modify it under the
5terms of either:
6
7a) the Apache License Version 2.0, or
8b) the Mozilla Public License Version 2.0
9
10-----------------------------------------------------------------------------
11
12Licensed under the Apache License, Version 2.0 (the "License");
13you may not use this file except in compliance with the License.
14You may obtain a copy of the License at
15
16 http://www.apache.org/licenses/LICENSE-2.0
17
18 Unless required by applicable law or agreed to in writing, software
19 distributed under the License is distributed on an "AS IS" BASIS,
20 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 See the License for the specific language governing permissions and
22 limitations under the License.
23
24-----------------------------------------------------------------------------
25Mozilla Public License, version 2.0
26
271. Definitions
28
291.1. “Contributor”
30
31 means each individual or legal entity that creates, contributes to the
32 creation of, or owns Covered Software.
33
341.2. “Contributor Version”
35
36 means the combination of the Contributions of others (if any) used by a
37 Contributor and that particular Contributor’s Contribution.
38
391.3. “Contribution”
40
41 means Covered Software of a particular Contributor.
42
431.4. “Covered Software”
44
45 means Source Code Form to which the initial Contributor has attached the
46 notice in Exhibit A, the Executable Form of such Source Code Form, and
47 Modifications of such Source Code Form, in each case including portions
48 thereof.
49
501.5. “Incompatible With Secondary Licenses”
51 means
52
53 a. that the initial Contributor has attached the notice described in
54 Exhibit B to the Covered Software; or
55
56 b. that the Covered Software was made available under the terms of version
57 1.1 or earlier of the License, but not also under the terms of a
58 Secondary License.
59
601.6. “Executable Form”
61
62 means any form of the work other than Source Code Form.
63
641.7. “Larger Work”
65
66 means a work that combines Covered Software with other material, in a separate
67 file or files, that is not Covered Software.
68
691.8. “License”
70
71 means this document.
72
731.9. “Licensable”
74
75 means having the right to grant, to the maximum extent possible, whether at the
76 time of the initial grant or subsequently, any and all of the rights conveyed by
77 this License.
78
791.10. “Modifications”
80
81 means any of the following:
82
83 a. any file in Source Code Form that results from an addition to, deletion
84 from, or modification of the contents of Covered Software; or
85
86 b. any new file in Source Code Form that contains any Covered Software.
87
881.11. “Patent Claims” of a Contributor
89
90 means any patent claim(s), including without limitation, method, process,
91 and apparatus claims, in any patent Licensable by such Contributor that
92 would be infringed, but for the grant of the License, by the making,
93 using, selling, offering for sale, having made, import, or transfer of
94 either its Contributions or its Contributor Version.
95
961.12. “Secondary License”
97
98 means either the GNU General Public License, Version 2.0, the GNU Lesser
99 General Public License, Version 2.1, the GNU Affero General Public
100 License, Version 3.0, or any later versions of those licenses.
101
1021.13. “Source Code Form”
103
104 means the form of the work preferred for making modifications.
105
1061.14. “You” (or “Your”)
107
108 means an individual or a legal entity exercising rights under this
109 License. For legal entities, “You” includes any entity that controls, is
110 controlled by, or is under common control with You. For purposes of this
111 definition, “control” means (a) the power, direct or indirect, to cause
112 the direction or management of such entity, whether by contract or
113 otherwise, or (b) ownership of more than fifty percent (50%) of the
114 outstanding shares or beneficial ownership of such entity.
115
116
1172. License Grants and Conditions
118
1192.1. Grants
120
121 Each Contributor hereby grants You a world-wide, royalty-free,
122 non-exclusive license:
123
124 a. under intellectual property rights (other than patent or trademark)
125 Licensable by such Contributor to use, reproduce, make available,
126 modify, display, perform, distribute, and otherwise exploit its
127 Contributions, either on an unmodified basis, with Modifications, or as
128 part of a Larger Work; and
129
130 b. under Patent Claims of such Contributor to make, use, sell, offer for
131 sale, have made, import, and otherwise transfer either its Contributions
132 or its Contributor Version.
133
1342.2. Effective Date
135
136 The licenses granted in Section 2.1 with respect to any Contribution become
137 effective for each Contribution on the date the Contributor first distributes
138 such Contribution.
139
1402.3. Limitations on Grant Scope
141
142 The licenses granted in this Section 2 are the only rights granted under this
143 License. No additional rights or licenses will be implied from the distribution
144 or licensing of Covered Software under this License. Notwithstanding Section
145 2.1(b) above, no patent license is granted by a Contributor:
146
147 a. for any code that a Contributor has removed from Covered Software; or
148
149 b. for infringements caused by: (i) Your and any other third party’s
150 modifications of Covered Software, or (ii) the combination of its
151 Contributions with other software (except as part of its Contributor
152 Version); or
153
154 c. under Patent Claims infringed by Covered Software in the absence of its
155 Contributions.
156
157 This License does not grant any rights in the trademarks, service marks, or
158 logos of any Contributor (except as may be necessary to comply with the
159 notice requirements in Section 3.4).
160
1612.4. Subsequent Licenses
162
163 No Contributor makes additional grants as a result of Your choice to
164 distribute the Covered Software under a subsequent version of this License
165 (see Section 10.2) or under the terms of a Secondary License (if permitted
166 under the terms of Section 3.3).
167
1682.5. Representation
169
170 Each Contributor represents that the Contributor believes its Contributions
171 are its original creation(s) or it has sufficient rights to grant the
172 rights to its Contributions conveyed by this License.
173
1742.6. Fair Use
175
176 This License is not intended to limit any rights You have under applicable
177 copyright doctrines of fair use, fair dealing, or other equivalents.
178
1792.7. Conditions
180
181 Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
182 Section 2.1.
183
184
1853. Responsibilities
186
1873.1. Distribution of Source Form
188
189 All distribution of Covered Software in Source Code Form, including any
190 Modifications that You create or to which You contribute, must be under the
191 terms of this License. You must inform recipients that the Source Code Form
192 of the Covered Software is governed by the terms of this License, and how
193 they can obtain a copy of this License. You may not attempt to alter or
194 restrict the recipients’ rights in the Source Code Form.
195
1963.2. Distribution of Executable Form
197
198 If You distribute Covered Software in Executable Form then:
199
200 a. such Covered Software must also be made available in Source Code Form,
201 as described in Section 3.1, and You must inform recipients of the
202 Executable Form how they can obtain a copy of such Source Code Form by
203 reasonable means in a timely manner, at a charge no more than the cost
204 of distribution to the recipient; and
205
206 b. You may distribute such Executable Form under the terms of this License,
207 or sublicense it under different terms, provided that the license for
208 the Executable Form does not attempt to limit or alter the recipients’
209 rights in the Source Code Form under this License.
210
2113.3. Distribution of a Larger Work
212
213 You may create and distribute a Larger Work under terms of Your choice,
214 provided that You also comply with the requirements of this License for the
215 Covered Software. If the Larger Work is a combination of Covered Software
216 with a work governed by one or more Secondary Licenses, and the Covered
217 Software is not Incompatible With Secondary Licenses, this License permits
218 You to additionally distribute such Covered Software under the terms of
219 such Secondary License(s), so that the recipient of the Larger Work may, at
220 their option, further distribute the Covered Software under the terms of
221 either this License or such Secondary License(s).
222
2233.4. Notices
224
225 You may not remove or alter the substance of any license notices (including
226 copyright notices, patent notices, disclaimers of warranty, or limitations
227 of liability) contained within the Source Code Form of the Covered
228 Software, except that You may alter any license notices to the extent
229 required to remedy known factual inaccuracies.
230
2313.5. Application of Additional Terms
232
233 You may choose to offer, and to charge a fee for, warranty, support,
234 indemnity or liability obligations to one or more recipients of Covered
235 Software. However, You may do so only on Your own behalf, and not on behalf
236 of any Contributor. You must make it absolutely clear that any such
237 warranty, support, indemnity, or liability obligation is offered by You
238 alone, and You hereby agree to indemnify every Contributor for any
239 liability incurred by such Contributor as a result of warranty, support,
240 indemnity or liability terms You offer. You may include additional
241 disclaimers of warranty and limitations of liability specific to any
242 jurisdiction.
243
2444. Inability to Comply Due to Statute or Regulation
245
246 If it is impossible for You to comply with any of the terms of this License
247 with respect to some or all of the Covered Software due to statute, judicial
248 order, or regulation then You must: (a) comply with the terms of this License
249 to the maximum extent possible; and (b) describe the limitations and the code
250 they affect. Such description must be placed in a text file included with all
251 distributions of the Covered Software under this License. Except to the
252 extent prohibited by statute or regulation, such description must be
253 sufficiently detailed for a recipient of ordinary skill to be able to
254 understand it.
255
2565. Termination
257
2585.1. The rights granted under this License will terminate automatically if You
259 fail to comply with any of its terms. However, if You become compliant,
260 then the rights granted under this License from a particular Contributor
261 are reinstated (a) provisionally, unless and until such Contributor
262 explicitly and finally terminates Your grants, and (b) on an ongoing basis,
263 if such Contributor fails to notify You of the non-compliance by some
264 reasonable means prior to 60 days after You have come back into compliance.
265 Moreover, Your grants from a particular Contributor are reinstated on an
266 ongoing basis if such Contributor notifies You of the non-compliance by
267 some reasonable means, this is the first time You have received notice of
268 non-compliance with this License from such Contributor, and You become
269 compliant prior to 30 days after Your receipt of the notice.
270
2715.2. If You initiate litigation against any entity by asserting a patent
272 infringement claim (excluding declaratory judgment actions, counter-claims,
273 and cross-claims) alleging that a Contributor Version directly or
274 indirectly infringes any patent, then the rights granted to You by any and
275 all Contributors for the Covered Software under Section 2.1 of this License
276 shall terminate.
277
2785.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
279 license agreements (excluding distributors and resellers) which have been
280 validly granted by You or Your distributors under this License prior to
281 termination shall survive termination.
282
2836. Disclaimer of Warranty
284
285 Covered Software is provided under this License on an “as is” basis, without
286 warranty of any kind, either expressed, implied, or statutory, including,
287 without limitation, warranties that the Covered Software is free of defects,
288 merchantable, fit for a particular purpose or non-infringing. The entire
289 risk as to the quality and performance of the Covered Software is with You.
290 Should any Covered Software prove defective in any respect, You (not any
291 Contributor) assume the cost of any necessary servicing, repair, or
292 correction. This disclaimer of warranty constitutes an essential part of this
293 License. No use of any Covered Software is authorized under this License
294 except under this disclaimer.
295
2967. Limitation of Liability
297
298 Under no circumstances and under no legal theory, whether tort (including
299 negligence), contract, or otherwise, shall any Contributor, or anyone who
300 distributes Covered Software as permitted above, be liable to You for any
301 direct, indirect, special, incidental, or consequential damages of any
302 character including, without limitation, damages for lost profits, loss of
303 goodwill, work stoppage, computer failure or malfunction, or any and all
304 other commercial damages or losses, even if such party shall have been
305 informed of the possibility of such damages. This limitation of liability
306 shall not apply to liability for death or personal injury resulting from such
307 party’s negligence to the extent applicable law prohibits such limitation.
308 Some jurisdictions do not allow the exclusion or limitation of incidental or
309 consequential damages, so this exclusion and limitation may not apply to You.
310
3118. Litigation
312
313 Any litigation relating to this License may be brought only in the courts of
314 a jurisdiction where the defendant maintains its principal place of business
315 and such litigation shall be governed by laws of that jurisdiction, without
316 reference to its conflict-of-law provisions. Nothing in this Section shall
317 prevent a party’s ability to bring cross-claims or counter-claims.
318
3199. Miscellaneous
320
321 This License represents the complete agreement concerning the subject matter
322 hereof. If any provision of this License is held to be unenforceable, such
323 provision shall be reformed only to the extent necessary to make it
324 enforceable. Any law or regulation which provides that the language of a
325 contract shall be construed against the drafter shall not be used to construe
326 this License against a Contributor.
327
328
32910. Versions of the License
330
33110.1. New Versions
332
333 Mozilla Foundation is the license steward. Except as provided in Section
334 10.3, no one other than the license steward has the right to modify or
335 publish new versions of this License. Each version will be given a
336 distinguishing version number.
337
33810.2. Effect of New Versions
339
340 You may distribute the Covered Software under the terms of the version of
341 the License under which You originally received the Covered Software, or
342 under the terms of any subsequent version published by the license
343 steward.
344
34510.3. Modified Versions
346
347 If you create software not governed by this License, and you want to
348 create a new license for such software, you may create and use a modified
349 version of this License if you rename the license and remove any
350 references to the name of the license steward (except to note that such
351 modified license differs from this License).
352
35310.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
354 If You choose to distribute Source Code Form that is Incompatible With
355 Secondary Licenses under the terms of this version of the License, the
356 notice described in Exhibit B of this License must be attached.
357
358Exhibit A - Source Code Form License Notice
359
360 This Source Code Form is subject to the
361 terms of the Mozilla Public License, v.
362 2.0. If a copy of the MPL was not
363 distributed with this file, You can
364 obtain one at
365 http://mozilla.org/MPL/2.0/.
366
367If it is not possible or desirable to put the notice in a particular file, then
368You may include the notice in a location (such as a LICENSE file in a relevant
369directory) where a recipient would be likely to look for such a notice.
370
371You may add additional accurate notices of copyright ownership.
372
373Exhibit B - “Incompatible With Secondary Licenses” Notice
374
375 This Source Code Form is “Incompatible
376 With Secondary Licenses”, as defined by
377 the Mozilla Public License, v. 2.0.
378