You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

LICENSE 17KB

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