Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8038ec9654 | |||
| c13abcb833 | |||
| 785ca48f52 | |||
| 1c8be332a4 | |||
| ef29e27f39 | |||
| 482d936196 | |||
| 9dd3c70fc3 | |||
| fe2a441171 | |||
| 7c32b5f219 | |||
| ebc6f7a097 | |||
| d29a70dfec | |||
| b8f56ca97d | |||
| 0f954d5d56 | |||
| ac5089d69b | |||
| c9c36397e0 | |||
| 923e271429 | |||
| da765169fa | |||
| ec6d03ee57 | |||
| 7944549bd7 | |||
| bb6a97984b | |||
| 0aff9cf787 | |||
| b7bf9d2b04 | |||
| 12af838fa2 | |||
| 14b8b5390f | |||
| a5599c4163 | |||
| c0ac25645d | |||
| fa431550d7 | |||
| 70c6aee814 | |||
| 7309b97b92 | |||
| 7ffb8e5ca0 | |||
| 16ed846e65 | |||
| 820b3ef091 | |||
| fb7ea25b1f | |||
| 5302c16600 | |||
| 2dfdeb22ca | |||
| 135715b606 | |||
| f8e6a39171 | |||
| 84960e71ee | |||
| 7b028a2819 | |||
| 5aa77eac9b |
+1
-1
@@ -1,5 +1,5 @@
|
||||
module: HTMLKit
|
||||
module_version: 2.1.1
|
||||
module_version: 2.1.4
|
||||
author: Iskandar Abudiab
|
||||
author_url: https://twitter.com/iabudiab
|
||||
github_url: https://github.com/iabudiab/HTMLKit
|
||||
|
||||
@@ -1,5 +1,36 @@
|
||||
# Change Log
|
||||
|
||||
## [2.1.4](https://github.com/iabudiab/HTMLKit/releases/tag/2.1.4)
|
||||
|
||||
Released on 2018.05.01
|
||||
|
||||
### Fixes
|
||||
|
||||
- `gt(n)`, `lt(n)` and `eq(n)` selectors would select wrong elements for the zero-index (issue #25)
|
||||
|
||||
|
||||
## [2.1.3](https://github.com/iabudiab/HTMLKit/releases/tag/2.1.3)
|
||||
|
||||
Released on 2018.03.21
|
||||
|
||||
### Fixes
|
||||
|
||||
- `HTMLElement` clone would return an immutable dictionary for attributes (issue #20)
|
||||
- Fixed by @CRivlaldo in PR #24
|
||||
- `HTMLNodeFilterBlock` would behave differently on simulator and device (issue #22)
|
||||
- Fixed by @CRivlaldo in PR #23
|
||||
|
||||
|
||||
## [2.1.2](https://github.com/iabudiab/HTMLKit/releases/tag/2.1.2)
|
||||
|
||||
Released on 2017.11.6
|
||||
|
||||
### Fixes
|
||||
|
||||
- `HTMLText` serialization (issue #16)
|
||||
- `HTMLElement` attribute value serialization (issue #17)
|
||||
|
||||
|
||||
## [2.1.1](https://github.com/iabudiab/HTMLKit/releases/tag/2.1.1)
|
||||
|
||||
Released on 2017.10.13
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
import HTMLKit
|
||||
|
||||
HTMLSanitizingPolicy { (builder) in
|
||||
builder
|
||||
.allowCommonBlockElements()
|
||||
.allowCommonInlineFormattingElements()
|
||||
.allowElements(["p", "div"])
|
||||
.allow(HTMLElementPolicy.identity(), onElements: ["b", "p"])
|
||||
.allow(HTMLAttributePolicy.init(), onElements: [])
|
||||
.disallowText(inElements: ["a"])
|
||||
}
|
||||
|
||||
HTMLElementPolicy { (str) -> String in
|
||||
return str
|
||||
}
|
||||
|
||||
|
||||
HTMLSanitizer { (builder) in
|
||||
builder
|
||||
.allowCommonBlockElements()
|
||||
.allowCommonInlineFormattingElements()
|
||||
.allowElements(["p", "div"])
|
||||
.allow(HTMLElementPolicy.identity() , onElements: ["b", "p"])
|
||||
.allow(HTMLAttributePolicy.init(), onElements: [])
|
||||
.disallowText(inElements: ["a"])
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<playground version='6.0' target-platform='macos' display-mode='rendered' last-migration='0800'>
|
||||
<playground version='6.0' target-platform='macos' display-mode='raw' last-migration='0800'>
|
||||
<pages>
|
||||
<page name='Intro'/>
|
||||
<page name='Parsing Documents'/>
|
||||
<page name='Parsing Fragments'/>
|
||||
<page name='The DOM'/>
|
||||
<page name='CSS Selectors'/>
|
||||
<page name='Sanitizing HTML'/>
|
||||
</pages>
|
||||
</playground>
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "HTMLKit"
|
||||
s.version = "2.1.1"
|
||||
s.version = "2.1.4"
|
||||
s.summary = "HTMLKit, an Objective-C framework for your everyday HTML needs."
|
||||
s.license = "MIT"
|
||||
s.homepage = "https://github.com/iabudiab/HTMLKit"
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
62056C501E2AD9FB009A4EE0 /* HTMLNodeIterator+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 62056C4E1E2AD9FB009A4EE0 /* HTMLNodeIterator+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
62056C511E2AD9FB009A4EE0 /* HTMLNodeIterator+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 62056C4E1E2AD9FB009A4EE0 /* HTMLNodeIterator+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
62056C521E2AD9FB009A4EE0 /* HTMLNodeIterator+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 62056C4E1E2AD9FB009A4EE0 /* HTMLNodeIterator+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
620AB7B12087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m in Sources */ = {isa = PBXBuildFile; fileRef = 620AB7B02087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m */; };
|
||||
620AB7B22087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m in Sources */ = {isa = PBXBuildFile; fileRef = 620AB7B02087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m */; };
|
||||
620AB7B32087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m in Sources */ = {isa = PBXBuildFile; fileRef = 620AB7B02087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m */; };
|
||||
62132E5A1C01F83200084175 /* CSSSelectorTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 62132E581C01F83200084175 /* CSSSelectorTest.m */; };
|
||||
62132E5D1C021FF200084175 /* css-tests in Resources */ = {isa = PBXBuildFile; fileRef = 62132E5B1C021FF200084175 /* css-tests */; };
|
||||
6216ACFD1C28DCC80074CAB4 /* CSSExtensionSelectorsParsingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6216ACFC1C28DCC80074CAB4 /* CSSExtensionSelectorsParsingTests.m */; };
|
||||
@@ -73,6 +76,38 @@
|
||||
626BE1E71DF3819600C49514 /* HTMLDOMUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 626BE1E11DF3819500C49514 /* HTMLDOMUtils.m */; };
|
||||
626BE1E81DF3819600C49514 /* HTMLDOMUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 626BE1E11DF3819500C49514 /* HTMLDOMUtils.m */; };
|
||||
626BE1E91DF3819600C49514 /* HTMLDOMUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 626BE1E11DF3819500C49514 /* HTMLDOMUtils.m */; };
|
||||
627E609D20B9C55400AB06E8 /* HTMLSanitizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 627E609B20B9C55400AB06E8 /* HTMLSanitizer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
627E609E20B9C55400AB06E8 /* HTMLSanitizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 627E609B20B9C55400AB06E8 /* HTMLSanitizer.h */; };
|
||||
627E609F20B9C55400AB06E8 /* HTMLSanitizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 627E609B20B9C55400AB06E8 /* HTMLSanitizer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
627E60A020B9C55400AB06E8 /* HTMLSanitizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 627E609B20B9C55400AB06E8 /* HTMLSanitizer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
627E60A120B9C55400AB06E8 /* HTMLSanitizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 627E609C20B9C55400AB06E8 /* HTMLSanitizer.m */; };
|
||||
627E60A220B9C55400AB06E8 /* HTMLSanitizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 627E609C20B9C55400AB06E8 /* HTMLSanitizer.m */; };
|
||||
627E60A320B9C55400AB06E8 /* HTMLSanitizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 627E609C20B9C55400AB06E8 /* HTMLSanitizer.m */; };
|
||||
627E60A420B9C55400AB06E8 /* HTMLSanitizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 627E609C20B9C55400AB06E8 /* HTMLSanitizer.m */; };
|
||||
627E60A820B9C58F00AB06E8 /* HTMLElementPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 627E60A620B9C58F00AB06E8 /* HTMLElementPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
627E60A920B9C58F00AB06E8 /* HTMLElementPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 627E60A620B9C58F00AB06E8 /* HTMLElementPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
627E60AA20B9C58F00AB06E8 /* HTMLElementPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 627E60A620B9C58F00AB06E8 /* HTMLElementPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
627E60AB20B9C58F00AB06E8 /* HTMLElementPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 627E60A620B9C58F00AB06E8 /* HTMLElementPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
627E60AC20B9C58F00AB06E8 /* HTMLElementPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 627E60A720B9C58F00AB06E8 /* HTMLElementPolicy.m */; };
|
||||
627E60AD20B9C58F00AB06E8 /* HTMLElementPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 627E60A720B9C58F00AB06E8 /* HTMLElementPolicy.m */; };
|
||||
627E60AE20B9C58F00AB06E8 /* HTMLElementPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 627E60A720B9C58F00AB06E8 /* HTMLElementPolicy.m */; };
|
||||
627E60AF20B9C58F00AB06E8 /* HTMLElementPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 627E60A720B9C58F00AB06E8 /* HTMLElementPolicy.m */; };
|
||||
627E60BC20BA015100AB06E8 /* HTMLSanitizingPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 627E60BA20BA015100AB06E8 /* HTMLSanitizingPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
627E60BD20BA015100AB06E8 /* HTMLSanitizingPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 627E60BA20BA015100AB06E8 /* HTMLSanitizingPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
627E60BE20BA015100AB06E8 /* HTMLSanitizingPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 627E60BA20BA015100AB06E8 /* HTMLSanitizingPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
627E60BF20BA015100AB06E8 /* HTMLSanitizingPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 627E60BA20BA015100AB06E8 /* HTMLSanitizingPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
627E60C020BA015100AB06E8 /* HTMLSanitizingPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 627E60BB20BA015100AB06E8 /* HTMLSanitizingPolicy.m */; };
|
||||
627E60C120BA015100AB06E8 /* HTMLSanitizingPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 627E60BB20BA015100AB06E8 /* HTMLSanitizingPolicy.m */; };
|
||||
627E60C220BA015100AB06E8 /* HTMLSanitizingPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 627E60BB20BA015100AB06E8 /* HTMLSanitizingPolicy.m */; };
|
||||
627E60C320BA015100AB06E8 /* HTMLSanitizingPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 627E60BB20BA015100AB06E8 /* HTMLSanitizingPolicy.m */; };
|
||||
627E60C620BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 627E60C420BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
627E60C720BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 627E60C420BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
627E60C820BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 627E60C420BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
627E60C920BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 627E60C420BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
627E60CA20BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 627E60C520BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.m */; };
|
||||
627E60CB20BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 627E60C520BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.m */; };
|
||||
627E60CC20BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 627E60C520BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.m */; };
|
||||
627E60CD20BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 627E60C520BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.m */; };
|
||||
62857C6B1D3988EE008DC254 /* HTMLKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 625A14BC19C7829400AD0C32 /* HTMLKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
62857C6C1D3988EE008DC254 /* HTMLKitErrorDomain.h in Headers */ = {isa = PBXBuildFile; fileRef = 626652F81C03D30F00C3F121 /* HTMLKitErrorDomain.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
62857C6D1D398907008DC254 /* HTMLInputStreamReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 625A150619C78ABA00AD0C32 /* HTMLInputStreamReader.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
@@ -306,6 +341,17 @@
|
||||
62857D8F1D39A47F008DC254 /* CSSCombinatorSelector.h in Headers */ = {isa = PBXBuildFile; fileRef = 62FA04E11BCC360D009ABF98 /* CSSCombinatorSelector.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
62857D901D39A47F008DC254 /* CSSCompoundSelector.h in Headers */ = {isa = PBXBuildFile; fileRef = 620C87791BD44CBE00FB3EEE /* CSSCompoundSelector.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
628AF6301BC99A6C00496128 /* CSSNthExpressionsParserTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 628AF62E1BC99A6C00496128 /* CSSNthExpressionsParserTests.m */; };
|
||||
62A6CDCE20BC9A3D00351AAE /* HTMLAttributePolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 62A6CDCC20BC9A3D00351AAE /* HTMLAttributePolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
62A6CDCF20BC9A3D00351AAE /* HTMLAttributePolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 62A6CDCC20BC9A3D00351AAE /* HTMLAttributePolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
62A6CDD020BC9A3D00351AAE /* HTMLAttributePolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 62A6CDCC20BC9A3D00351AAE /* HTMLAttributePolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
62A6CDD120BC9A3D00351AAE /* HTMLAttributePolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 62A6CDCC20BC9A3D00351AAE /* HTMLAttributePolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
62A6CDD220BC9A3D00351AAE /* HTMLAttributePolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 62A6CDCD20BC9A3D00351AAE /* HTMLAttributePolicy.m */; };
|
||||
62A6CDD320BC9A3D00351AAE /* HTMLAttributePolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 62A6CDCD20BC9A3D00351AAE /* HTMLAttributePolicy.m */; };
|
||||
62A6CDD420BC9A3D00351AAE /* HTMLAttributePolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 62A6CDCD20BC9A3D00351AAE /* HTMLAttributePolicy.m */; };
|
||||
62A6CDD520BC9A3D00351AAE /* HTMLAttributePolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 62A6CDCD20BC9A3D00351AAE /* HTMLAttributePolicy.m */; };
|
||||
62A95A4D1FB0FBFC0009FF26 /* HTMLSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 62A95A4C1FB0FBFC0009FF26 /* HTMLSerializationTests.m */; };
|
||||
62A95A4E1FB0FBFC0009FF26 /* HTMLSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 62A95A4C1FB0FBFC0009FF26 /* HTMLSerializationTests.m */; };
|
||||
62A95A4F1FB0FBFC0009FF26 /* HTMLSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 62A95A4C1FB0FBFC0009FF26 /* HTMLSerializationTests.m */; };
|
||||
62D8345A19FB1AC4009205A9 /* HTML5LibTokenizerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 62D8345819FB1AC4009205A9 /* HTML5LibTokenizerTest.m */; };
|
||||
62D91C231DE218A500BEFADE /* HTMLRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 62D91C211DE218A500BEFADE /* HTMLRange.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
62D91C241DE218A500BEFADE /* HTMLRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 62D91C211DE218A500BEFADE /* HTMLRange.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
@@ -321,6 +367,14 @@
|
||||
62E1A3B51E610E5300C41C3B /* Fixtures in Resources */ = {isa = PBXBuildFile; fileRef = 62E1A3B41E610E5300C41C3B /* Fixtures */; };
|
||||
62E1A3B61E610E5300C41C3B /* Fixtures in Resources */ = {isa = PBXBuildFile; fileRef = 62E1A3B41E610E5300C41C3B /* Fixtures */; };
|
||||
62E1A3B71E610E5300C41C3B /* Fixtures in Resources */ = {isa = PBXBuildFile; fileRef = 62E1A3B41E610E5300C41C3B /* Fixtures */; };
|
||||
62E2BC0D20C0A93300979D71 /* HTMLTokenPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 62E2BC0B20C0A93300979D71 /* HTMLTokenPolicy.h */; };
|
||||
62E2BC0E20C0A93300979D71 /* HTMLTokenPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 62E2BC0B20C0A93300979D71 /* HTMLTokenPolicy.h */; };
|
||||
62E2BC0F20C0A93300979D71 /* HTMLTokenPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 62E2BC0B20C0A93300979D71 /* HTMLTokenPolicy.h */; };
|
||||
62E2BC1020C0A93300979D71 /* HTMLTokenPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 62E2BC0B20C0A93300979D71 /* HTMLTokenPolicy.h */; };
|
||||
62E2BC1120C0A93300979D71 /* HTMLTokenPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 62E2BC0C20C0A93300979D71 /* HTMLTokenPolicy.m */; };
|
||||
62E2BC1220C0A93300979D71 /* HTMLTokenPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 62E2BC0C20C0A93300979D71 /* HTMLTokenPolicy.m */; };
|
||||
62E2BC1320C0A93300979D71 /* HTMLTokenPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 62E2BC0C20C0A93300979D71 /* HTMLTokenPolicy.m */; };
|
||||
62E2BC1420C0A93300979D71 /* HTMLTokenPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 62E2BC0C20C0A93300979D71 /* HTMLTokenPolicy.m */; };
|
||||
62EC0A851E158BD80007786B /* HTMLRangeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 62EC0A841E158BD80007786B /* HTMLRangeTests.m */; };
|
||||
62EC0A861E158BD80007786B /* HTMLRangeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 62EC0A841E158BD80007786B /* HTMLRangeTests.m */; };
|
||||
62EC0A871E158BD80007786B /* HTMLRangeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 62EC0A841E158BD80007786B /* HTMLRangeTests.m */; };
|
||||
@@ -581,6 +635,7 @@
|
||||
/* Begin PBXFileReference section */
|
||||
62056C4E1E2AD9FB009A4EE0 /* HTMLNodeIterator+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "HTMLNodeIterator+Private.h"; path = "include/HTMLNodeIterator+Private.h"; sourceTree = "<group>"; };
|
||||
62079BE71AF56F1E00D3B402 /* CSSSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSSelector.h; path = include/CSSSelector.h; sourceTree = "<group>"; };
|
||||
620AB7B02087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CSSStructuralPseudoSelectors.m; path = HTMLKitTests/CSSStructuralPseudoSelectors.m; sourceTree = "<group>"; };
|
||||
620C87791BD44CBE00FB3EEE /* CSSCompoundSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSCompoundSelector.h; path = include/CSSCompoundSelector.h; sourceTree = "<group>"; };
|
||||
620C877A1BD44CBE00FB3EEE /* CSSCompoundSelector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSSCompoundSelector.m; sourceTree = "<group>"; };
|
||||
620EE9471BC46F2A0028ED34 /* CSSPseudoClassSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSPseudoClassSelector.h; path = include/CSSPseudoClassSelector.h; sourceTree = "<group>"; };
|
||||
@@ -694,6 +749,14 @@
|
||||
6279F87119E17DC700F12EE5 /* HTMLParserInsertionModes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HTMLParserInsertionModes.h; path = include/HTMLParserInsertionModes.h; sourceTree = "<group>"; };
|
||||
6279F87219E1808D00F12EE5 /* HTMLElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLElement.h; path = include/HTMLElement.h; sourceTree = "<group>"; };
|
||||
6279F87319E1808D00F12EE5 /* HTMLElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTMLElement.m; sourceTree = "<group>"; };
|
||||
627E609B20B9C55400AB06E8 /* HTMLSanitizer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLSanitizer.h; sourceTree = "<group>"; };
|
||||
627E609C20B9C55400AB06E8 /* HTMLSanitizer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTMLSanitizer.m; sourceTree = "<group>"; };
|
||||
627E60A620B9C58F00AB06E8 /* HTMLElementPolicy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLElementPolicy.h; sourceTree = "<group>"; };
|
||||
627E60A720B9C58F00AB06E8 /* HTMLElementPolicy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTMLElementPolicy.m; sourceTree = "<group>"; };
|
||||
627E60BA20BA015100AB06E8 /* HTMLSanitizingPolicy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLSanitizingPolicy.h; sourceTree = "<group>"; };
|
||||
627E60BB20BA015100AB06E8 /* HTMLSanitizingPolicy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTMLSanitizingPolicy.m; sourceTree = "<group>"; };
|
||||
627E60C420BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLSanitizingPolicyBuilder.h; sourceTree = "<group>"; };
|
||||
627E60C520BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTMLSanitizingPolicyBuilder.m; sourceTree = "<group>"; };
|
||||
62857C4E1D398642008DC254 /* HTMLKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HTMLKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
62857CEA1D39A262008DC254 /* HTMLKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HTMLKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
62857CF31D39A262008DC254 /* HTMLKit-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "HTMLKit-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -703,6 +766,9 @@
|
||||
628AF63C1BC9D6FB00496128 /* CSSStructuralPseudoSelectors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSStructuralPseudoSelectors.h; path = include/CSSStructuralPseudoSelectors.h; sourceTree = "<group>"; };
|
||||
628AF63D1BC9D6FB00496128 /* CSSStructuralPseudoSelectors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSSStructuralPseudoSelectors.m; sourceTree = "<group>"; };
|
||||
628B7CE61A080E1000602C87 /* HTMLNamespaces.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HTMLNamespaces.h; path = include/HTMLNamespaces.h; sourceTree = "<group>"; };
|
||||
62A6CDCC20BC9A3D00351AAE /* HTMLAttributePolicy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLAttributePolicy.h; sourceTree = "<group>"; };
|
||||
62A6CDCD20BC9A3D00351AAE /* HTMLAttributePolicy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTMLAttributePolicy.m; sourceTree = "<group>"; };
|
||||
62A95A4C1FB0FBFC0009FF26 /* HTMLSerializationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = HTMLSerializationTests.m; path = HTMLKitTests/HTMLSerializationTests.m; sourceTree = "<group>"; };
|
||||
62ACB8DB1BC5C13E00E283C1 /* CSSPseudoFunctionSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSPseudoFunctionSelector.h; path = include/CSSPseudoFunctionSelector.h; sourceTree = "<group>"; };
|
||||
62ACB8DC1BC5C13E00E283C1 /* CSSPseudoFunctionSelector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSSPseudoFunctionSelector.m; sourceTree = "<group>"; };
|
||||
62AE593319F97D880043F069 /* HTMLParseErrorToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLParseErrorToken.h; path = include/HTMLParseErrorToken.h; sourceTree = "<group>"; };
|
||||
@@ -721,6 +787,8 @@
|
||||
62D91C221DE218A500BEFADE /* HTMLRange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTMLRange.m; sourceTree = "<group>"; };
|
||||
62E0BA961E25456700E4D193 /* HTMLCharacterDataTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTMLCharacterDataTests.m; path = HTMLKitTests/HTMLCharacterDataTests.m; sourceTree = "<group>"; };
|
||||
62E1A3B41E610E5300C41C3B /* Fixtures */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Fixtures; sourceTree = "<group>"; };
|
||||
62E2BC0B20C0A93300979D71 /* HTMLTokenPolicy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLTokenPolicy.h; sourceTree = "<group>"; };
|
||||
62E2BC0C20C0A93300979D71 /* HTMLTokenPolicy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTMLTokenPolicy.m; sourceTree = "<group>"; };
|
||||
62E7CAAE19CDFFB500465A83 /* HTMLTokenizerCharacters.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HTMLTokenizerCharacters.h; path = include/HTMLTokenizerCharacters.h; sourceTree = "<group>"; };
|
||||
62EC0A841E158BD80007786B /* HTMLRangeTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTMLRangeTests.m; path = HTMLKitTests/HTMLRangeTests.m; sourceTree = "<group>"; };
|
||||
62EC7AE51AEEAC6F0015D3BE /* HTMLMutationAlgorithmsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTMLMutationAlgorithmsTests.m; path = HTMLKitTests/HTMLMutationAlgorithmsTests.m; sourceTree = "<group>"; };
|
||||
@@ -885,6 +953,7 @@
|
||||
62EC7AE51AEEAC6F0015D3BE /* HTMLMutationAlgorithmsTests.m */,
|
||||
62EC0A841E158BD80007786B /* HTMLRangeTests.m */,
|
||||
62E0BA961E25456700E4D193 /* HTMLCharacterDataTests.m */,
|
||||
62A95A4C1FB0FBFC0009FF26 /* HTMLSerializationTests.m */,
|
||||
);
|
||||
name = DOM;
|
||||
sourceTree = "<group>";
|
||||
@@ -957,6 +1026,7 @@
|
||||
625A14BC19C7829400AD0C32 /* HTMLKit.h */,
|
||||
626652F81C03D30F00C3F121 /* HTMLKitErrorDomain.h */,
|
||||
62AE593219F97CCA0043F069 /* Tokenizing */,
|
||||
627E609A20B9C53B00AB06E8 /* Sanitizing */,
|
||||
628E16EC1ADAE71700B15A06 /* Parsing */,
|
||||
623719441AA1472B002E03C8 /* DOM */,
|
||||
628E16ED1ADAE73700B15A06 /* Categories */,
|
||||
@@ -1020,6 +1090,33 @@
|
||||
name = Private;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
627E609A20B9C53B00AB06E8 /* Sanitizing */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
627E609B20B9C55400AB06E8 /* HTMLSanitizer.h */,
|
||||
627E609C20B9C55400AB06E8 /* HTMLSanitizer.m */,
|
||||
627E60BA20BA015100AB06E8 /* HTMLSanitizingPolicy.h */,
|
||||
627E60BB20BA015100AB06E8 /* HTMLSanitizingPolicy.m */,
|
||||
627E60C420BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.h */,
|
||||
627E60C520BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.m */,
|
||||
627E60A520B9C55900AB06E8 /* Policies */,
|
||||
);
|
||||
name = Sanitizing;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
627E60A520B9C55900AB06E8 /* Policies */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
62E2BC0B20C0A93300979D71 /* HTMLTokenPolicy.h */,
|
||||
62E2BC0C20C0A93300979D71 /* HTMLTokenPolicy.m */,
|
||||
627E60A620B9C58F00AB06E8 /* HTMLElementPolicy.h */,
|
||||
627E60A720B9C58F00AB06E8 /* HTMLElementPolicy.m */,
|
||||
62A6CDCC20BC9A3D00351AAE /* HTMLAttributePolicy.h */,
|
||||
62A6CDCD20BC9A3D00351AAE /* HTMLAttributePolicy.m */,
|
||||
);
|
||||
name = Policies;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
628E16EC1ADAE71700B15A06 /* Parsing */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -1069,6 +1166,14 @@
|
||||
62E7CAAE19CDFFB500465A83 /* HTMLTokenizerCharacters.h */,
|
||||
62F31FDB19E9DCCF007F0657 /* HTMLTokenizerEntities.h */,
|
||||
62F31FDC19E9DCCF007F0657 /* HTMLTokenizerEntities.m */,
|
||||
62E2BC1520C0AAD000979D71 /* Tokens */,
|
||||
);
|
||||
name = Tokenizing;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
62E2BC1520C0AAD000979D71 /* Tokens */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
624AC8FE19FBF4F700BD3C4A /* HTMLTokens.h */,
|
||||
624493AA19CD0CBE00BCDDF4 /* HTMLToken.h */,
|
||||
624493AB19CD0CBE00BCDDF4 /* HTMLToken.m */,
|
||||
@@ -1085,7 +1190,7 @@
|
||||
6238039D1AB63A8C008A53D0 /* HTMLEOFToken.h */,
|
||||
6238039E1AB63A8C008A53D0 /* HTMLEOFToken.m */,
|
||||
);
|
||||
name = Tokenizing;
|
||||
name = Tokens;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
62ECBEDF1C0B671000AF847B /* Parsing */ = {
|
||||
@@ -1139,6 +1244,7 @@
|
||||
624AB3191B050A4D00F3830D /* CSSAttributeSelectorTests.m */,
|
||||
62F6586F1BD83C8E0045F137 /* CSSNThExpressionSelectorTests.m */,
|
||||
621FBE5C1BDAD90200BC9555 /* CSSCombinatorSelectorTests.m */,
|
||||
620AB7B02087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m */,
|
||||
);
|
||||
name = Selectors;
|
||||
sourceTree = "<group>";
|
||||
@@ -1158,11 +1264,13 @@
|
||||
62D91C231DE218A500BEFADE /* HTMLRange.h in Headers */,
|
||||
62ECBEE51C0B69FD00AF847B /* HTMLTokenizerCharacters.h in Headers */,
|
||||
62ECBEE61C0B69FD00AF847B /* HTMLTokenizerEntities.h in Headers */,
|
||||
627E60A820B9C58F00AB06E8 /* HTMLElementPolicy.h in Headers */,
|
||||
625D0F031C2717DE00D7BEB0 /* HTMLNode+Private.h in Headers */,
|
||||
62ECBEE71C0B69FD00AF847B /* HTMLTokens.h in Headers */,
|
||||
62ECBF1B1C0B6ABF00AF847B /* HTMLElement.h in Headers */,
|
||||
62ECBEE81C0B69FD00AF847B /* HTMLToken.h in Headers */,
|
||||
62ECBEE91C0B69FD00AF847B /* HTMLCharacterToken.h in Headers */,
|
||||
627E60C620BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.h in Headers */,
|
||||
62ECBEEA1C0B69FD00AF847B /* HTMLCommentToken.h in Headers */,
|
||||
62ECBEEB1C0B69FD00AF847B /* HTMLDOCTYPEToken.h in Headers */,
|
||||
626BE1E21DF3819500C49514 /* HTMLDOMUtils.h in Headers */,
|
||||
@@ -1177,6 +1285,7 @@
|
||||
62ECBEF11C0B69FD00AF847B /* HTMLListOfActiveFormattingElements.h in Headers */,
|
||||
62ECBEF21C0B69FD00AF847B /* HTMLElementTypes.h in Headers */,
|
||||
62ECBEF31C0B69FD00AF847B /* HTMLElementAdjustment.h in Headers */,
|
||||
627E60BC20BA015100AB06E8 /* HTMLSanitizingPolicy.h in Headers */,
|
||||
62ECBEF41C0B69FD00AF847B /* HTMLParserInsertionModes.h in Headers */,
|
||||
624C777A1DE9D05E00DD6DFA /* HTMLCharacterData.h in Headers */,
|
||||
62ECBEF51C0B69FD00AF847B /* HTMLMarker.h in Headers */,
|
||||
@@ -1184,11 +1293,13 @@
|
||||
62ECBEF71C0B69FE00AF847B /* HTMLNode.h in Headers */,
|
||||
621CC4A51DEA721A00D1992A /* HTMLParser+Private.h in Headers */,
|
||||
62ECBEF81C0B69FE00AF847B /* HTMLDocument.h in Headers */,
|
||||
62E2BC0D20C0A93300979D71 /* HTMLTokenPolicy.h in Headers */,
|
||||
62ECBEF91C0B69FE00AF847B /* HTMLDocumentType.h in Headers */,
|
||||
62ECBEFA1C0B69FE00AF847B /* HTMLDocumentFragment.h in Headers */,
|
||||
62ECBEFC1C0B69FE00AF847B /* HTMLComment.h in Headers */,
|
||||
62ECBEFD1C0B69FE00AF847B /* HTMLText.h in Headers */,
|
||||
62ECBEFE1C0B69FE00AF847B /* HTMLTemplate.h in Headers */,
|
||||
627E609D20B9C55400AB06E8 /* HTMLSanitizer.h in Headers */,
|
||||
62ECBEFF1C0B69FE00AF847B /* HTMLNodeIterator.h in Headers */,
|
||||
62ECBF001C0B69FF00AF847B /* HTMLTreeWalker.h in Headers */,
|
||||
62ECBF011C0B69FF00AF847B /* HTMLNodeTraversal.h in Headers */,
|
||||
@@ -1214,6 +1325,7 @@
|
||||
62ECBF131C0B6A0200AF847B /* CSSPseudoClassSelector.h in Headers */,
|
||||
62ECBF141C0B6A0200AF847B /* CSSNthExpressionSelector.h in Headers */,
|
||||
62ECBF151C0B6A0200AF847B /* CSSPseudoFunctionSelector.h in Headers */,
|
||||
62A6CDCE20BC9A3D00351AAE /* HTMLAttributePolicy.h in Headers */,
|
||||
62ECBF161C0B6A0300AF847B /* CSSCombinatorSelector.h in Headers */,
|
||||
62ECBF171C0B6A0300AF847B /* CSSCompoundSelector.h in Headers */,
|
||||
);
|
||||
@@ -1231,11 +1343,13 @@
|
||||
62857CA31D398973008DC254 /* HTMLDocumentType.h in Headers */,
|
||||
62D91C261DE218A500BEFADE /* HTMLRange.h in Headers */,
|
||||
62857C6B1D3988EE008DC254 /* HTMLKit.h in Headers */,
|
||||
627E60AB20B9C58F00AB06E8 /* HTMLElementPolicy.h in Headers */,
|
||||
62857C701D398907008DC254 /* HTMLTokenizerCharacters.h in Headers */,
|
||||
62857C6F1D398907008DC254 /* HTMLTokenizerStates.h in Headers */,
|
||||
62857C721D398907008DC254 /* HTMLTokens.h in Headers */,
|
||||
62857CBF1D398999008DC254 /* NSCharacterSet+HTMLKit.h in Headers */,
|
||||
62857CDD1D3989CE008DC254 /* CSSNthExpressionSelector.h in Headers */,
|
||||
627E60C920BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.h in Headers */,
|
||||
62857C841D398917008DC254 /* HTMLParser.h in Headers */,
|
||||
62857CDB1D3989CE008DC254 /* CSSAttributeSelector.h in Headers */,
|
||||
62857C791D398907008DC254 /* HTMLEOFToken.h in Headers */,
|
||||
@@ -1250,6 +1364,7 @@
|
||||
62857CA61D398973008DC254 /* HTMLText.h in Headers */,
|
||||
62857C751D398907008DC254 /* HTMLCommentToken.h in Headers */,
|
||||
62857C891D398927008DC254 /* HTMLParserInsertionModes.h in Headers */,
|
||||
627E60BF20BA015100AB06E8 /* HTMLSanitizingPolicy.h in Headers */,
|
||||
62857CA81D398973008DC254 /* HTMLDOMTokenList.h in Headers */,
|
||||
62857C851D398927008DC254 /* HTMLStackOfOpenElements.h in Headers */,
|
||||
624C777D1DE9D05E00DD6DFA /* HTMLCharacterData.h in Headers */,
|
||||
@@ -1257,11 +1372,13 @@
|
||||
62857CA91D398973008DC254 /* HTMLNodeIterator.h in Headers */,
|
||||
62857CAE1D398973008DC254 /* HTMLQuirksMode.h in Headers */,
|
||||
621CC4A81DEA721A00D1992A /* HTMLParser+Private.h in Headers */,
|
||||
62E2BC1020C0A93300979D71 /* HTMLTokenPolicy.h in Headers */,
|
||||
62857CAF1D398977008DC254 /* HTMLNodeTraversal.h in Headers */,
|
||||
62857C771D398907008DC254 /* HTMLParseErrorToken.h in Headers */,
|
||||
62857CDC1D3989CE008DC254 /* CSSPseudoClassSelector.h in Headers */,
|
||||
62857CC21D3989A1008DC254 /* HTMLOrderedDictionary.h in Headers */,
|
||||
62857C761D398907008DC254 /* HTMLDOCTYPEToken.h in Headers */,
|
||||
627E60A020B9C55400AB06E8 /* HTMLSanitizer.h in Headers */,
|
||||
62857CE21D39A119008DC254 /* HTMLNode+Private.h in Headers */,
|
||||
62857CD71D3989C2008DC254 /* CSSNthExpressionParser.h in Headers */,
|
||||
62857CAD1D398973008DC254 /* HTMLNamespaces.h in Headers */,
|
||||
@@ -1287,6 +1404,7 @@
|
||||
62857C6C1D3988EE008DC254 /* HTMLKitErrorDomain.h in Headers */,
|
||||
62857CD51D3989BF008DC254 /* CSSInputStream.h in Headers */,
|
||||
62857C741D398907008DC254 /* HTMLCharacterToken.h in Headers */,
|
||||
62A6CDD120BC9A3D00351AAE /* HTMLAttributePolicy.h in Headers */,
|
||||
62857CE31D39A1B5008DC254 /* HTMLElement.h in Headers */,
|
||||
62857CA71D398973008DC254 /* HTMLTemplate.h in Headers */,
|
||||
);
|
||||
@@ -1304,11 +1422,13 @@
|
||||
62857D7E1D39A45B008DC254 /* HTMLNode+Private.h in Headers */,
|
||||
62D91C251DE218A500BEFADE /* HTMLRange.h in Headers */,
|
||||
62857D701D39A44E008DC254 /* HTMLDocumentType.h in Headers */,
|
||||
627E60AA20B9C58F00AB06E8 /* HTMLElementPolicy.h in Headers */,
|
||||
62857D861D39A476008DC254 /* CSSCodePoints.h in Headers */,
|
||||
62857D8A1D39A47F008DC254 /* CSSTypeSelector.h in Headers */,
|
||||
62857D491D39A3F4008DC254 /* HTMLKit.h in Headers */,
|
||||
62857D8D1D39A47F008DC254 /* CSSNthExpressionSelector.h in Headers */,
|
||||
62857D721D39A44E008DC254 /* HTMLElement.h in Headers */,
|
||||
627E60C820BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.h in Headers */,
|
||||
62857D4E1D39A40A008DC254 /* HTMLTokenizerCharacters.h in Headers */,
|
||||
62857D4D1D39A40A008DC254 /* HTMLTokenizerStates.h in Headers */,
|
||||
62857D501D39A411008DC254 /* HTMLTokens.h in Headers */,
|
||||
@@ -1323,6 +1443,7 @@
|
||||
62857D531D39A411008DC254 /* HTMLCommentToken.h in Headers */,
|
||||
62857D741D39A44E008DC254 /* HTMLText.h in Headers */,
|
||||
62857D5D1D39A41D008DC254 /* HTMLParserInsertionModes.h in Headers */,
|
||||
627E60BE20BA015100AB06E8 /* HTMLSanitizingPolicy.h in Headers */,
|
||||
62857D591D39A41D008DC254 /* HTMLStackOfOpenElements.h in Headers */,
|
||||
62857D781D39A44E008DC254 /* HTMLTreeWalker.h in Headers */,
|
||||
624C777C1DE9D05E00DD6DFA /* HTMLCharacterData.h in Headers */,
|
||||
@@ -1330,11 +1451,13 @@
|
||||
62857D541D39A411008DC254 /* HTMLDOCTYPEToken.h in Headers */,
|
||||
62857D871D39A476008DC254 /* CSSInputStream.h in Headers */,
|
||||
621CC4A71DEA721A00D1992A /* HTMLParser+Private.h in Headers */,
|
||||
62E2BC0F20C0A93300979D71 /* HTMLTokenPolicy.h in Headers */,
|
||||
62857D8F1D39A47F008DC254 /* CSSCombinatorSelector.h in Headers */,
|
||||
62857D5C1D39A41D008DC254 /* HTMLElementAdjustment.h in Headers */,
|
||||
62857D891D39A47F008DC254 /* CSSSelectorBlock.h in Headers */,
|
||||
62857D6D1D39A44E008DC254 /* HTMLDOM.h in Headers */,
|
||||
62857D751D39A44E008DC254 /* HTMLTemplate.h in Headers */,
|
||||
627E609F20B9C55400AB06E8 /* HTMLSanitizer.h in Headers */,
|
||||
62857D771D39A44E008DC254 /* HTMLNodeIterator.h in Headers */,
|
||||
62857D711D39A44E008DC254 /* HTMLDocumentFragment.h in Headers */,
|
||||
62857D851D39A472008DC254 /* CSSNthExpressionParser.h in Headers */,
|
||||
@@ -1360,6 +1483,7 @@
|
||||
62857D4A1D39A3F4008DC254 /* HTMLKitErrorDomain.h in Headers */,
|
||||
62857D7C1D39A452008DC254 /* HTMLQuirksMode.h in Headers */,
|
||||
62857D791D39A44E008DC254 /* HTMLNodeFilter.h in Headers */,
|
||||
62A6CDD020BC9A3D00351AAE /* HTMLAttributePolicy.h in Headers */,
|
||||
62857D521D39A411008DC254 /* HTMLCharacterToken.h in Headers */,
|
||||
62857D811D39A466008DC254 /* HTMLOrderedDictionary.h in Headers */,
|
||||
);
|
||||
@@ -1377,11 +1501,13 @@
|
||||
62D91C241DE218A500BEFADE /* HTMLRange.h in Headers */,
|
||||
62ECBFA81C0B6D3A00AF847B /* HTMLDocument.h in Headers */,
|
||||
62ECBFA91C0B6D3A00AF847B /* HTMLDocumentType.h in Headers */,
|
||||
627E60A920B9C58F00AB06E8 /* HTMLElementPolicy.h in Headers */,
|
||||
62ECBFAA1C0B6D3A00AF847B /* HTMLDocumentFragment.h in Headers */,
|
||||
62ECBFAB1C0B6D3B00AF847B /* HTMLElement.h in Headers */,
|
||||
62ECBFAC1C0B6D3B00AF847B /* HTMLComment.h in Headers */,
|
||||
62ECBFAD1C0B6D3B00AF847B /* HTMLText.h in Headers */,
|
||||
62ECBFAE1C0B6D3B00AF847B /* HTMLTemplate.h in Headers */,
|
||||
627E60C720BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.h in Headers */,
|
||||
62ECBFAF1C0B6D3B00AF847B /* HTMLNodeIterator.h in Headers */,
|
||||
62ECBFB01C0B6D3C00AF847B /* HTMLTreeWalker.h in Headers */,
|
||||
62ECBFB21C0B6D3C00AF847B /* HTMLNodeFilter.h in Headers */,
|
||||
@@ -1396,6 +1522,7 @@
|
||||
62ECBFB81C0B6D3E00AF847B /* HTMLOrderedDictionary.h in Headers */,
|
||||
62ECBFB91C0B6D3E00AF847B /* CSSSelectors.h in Headers */,
|
||||
62ECBFBA1C0B6D3E00AF847B /* CSSStructuralPseudoSelectors.h in Headers */,
|
||||
627E60BD20BA015100AB06E8 /* HTMLSanitizingPolicy.h in Headers */,
|
||||
624C777B1DE9D05E00DD6DFA /* HTMLCharacterData.h in Headers */,
|
||||
62ECBFBD1C0B6D3F00AF847B /* CSSSelectorParser.h in Headers */,
|
||||
62ECBFBE1C0B6D4000AF847B /* CSSNthExpressionParser.h in Headers */,
|
||||
@@ -1403,11 +1530,13 @@
|
||||
621CC4A61DEA721A00D1992A /* HTMLParser+Private.h in Headers */,
|
||||
62ECBFC01C0B6D4000AF847B /* CSSSelectorBlock.h in Headers */,
|
||||
62ECBFC11C0B6D4100AF847B /* CSSTypeSelector.h in Headers */,
|
||||
62E2BC0E20C0A93300979D71 /* HTMLTokenPolicy.h in Headers */,
|
||||
62ECBFC21C0B6D4100AF847B /* CSSAttributeSelector.h in Headers */,
|
||||
62ECBFC31C0B6D4100AF847B /* CSSPseudoClassSelector.h in Headers */,
|
||||
62ECBFC41C0B6D4200AF847B /* CSSNthExpressionSelector.h in Headers */,
|
||||
62ECBFC51C0B6D4200AF847B /* CSSPseudoFunctionSelector.h in Headers */,
|
||||
62ECBFC61C0B6D4300AF847B /* CSSCombinatorSelector.h in Headers */,
|
||||
627E609E20B9C55400AB06E8 /* HTMLSanitizer.h in Headers */,
|
||||
62F7E5A31DEB63F900DEF09B /* HTMLRange+Private.h in Headers */,
|
||||
626BE1E31DF3819500C49514 /* HTMLDOMUtils.h in Headers */,
|
||||
625D0F041C2717DE00D7BEB0 /* HTMLNode+Private.h in Headers */,
|
||||
@@ -1433,6 +1562,7 @@
|
||||
62ECBFA31C0B6D3900AF847B /* HTMLElementAdjustment.h in Headers */,
|
||||
62ECBFA41C0B6D3900AF847B /* HTMLParserInsertionModes.h in Headers */,
|
||||
62ECBFA51C0B6D3900AF847B /* HTMLMarker.h in Headers */,
|
||||
62A6CDCF20BC9A3D00351AAE /* HTMLAttributePolicy.h in Headers */,
|
||||
62ECBFBB1C0B6D3F00AF847B /* CSSCodePoints.h in Headers */,
|
||||
62ECBFBC1C0B6D3F00AF847B /* CSSInputStream.h in Headers */,
|
||||
);
|
||||
@@ -1693,6 +1823,8 @@
|
||||
62ECBF1D1C0B6B7900AF847B /* HTMLTokenizer.m in Sources */,
|
||||
62ECBF1E1C0B6B7900AF847B /* HTMLTokenizerEntities.m in Sources */,
|
||||
62ECBF1F1C0B6B7900AF847B /* HTMLToken.m in Sources */,
|
||||
62E2BC1120C0A93300979D71 /* HTMLTokenPolicy.m in Sources */,
|
||||
627E60A120B9C55400AB06E8 /* HTMLSanitizer.m in Sources */,
|
||||
62ECBF201C0B6B7900AF847B /* HTMLCharacterToken.m in Sources */,
|
||||
62ECBF211C0B6B7900AF847B /* HTMLCommentToken.m in Sources */,
|
||||
62ECBF221C0B6B7900AF847B /* HTMLDOCTYPEToken.m in Sources */,
|
||||
@@ -1710,6 +1842,7 @@
|
||||
62ECBF2D1C0B6B7900AF847B /* HTMLDocumentFragment.m in Sources */,
|
||||
62ECBF2E1C0B6B7900AF847B /* HTMLElement.m in Sources */,
|
||||
62ECBF2F1C0B6B7900AF847B /* HTMLComment.m in Sources */,
|
||||
62A6CDD220BC9A3D00351AAE /* HTMLAttributePolicy.m in Sources */,
|
||||
62ECBF301C0B6B7900AF847B /* HTMLText.m in Sources */,
|
||||
62ECBF311C0B6B7900AF847B /* HTMLTemplate.m in Sources */,
|
||||
62ECBF321C0B6B7900AF847B /* HTMLNodeIterator.m in Sources */,
|
||||
@@ -1719,10 +1852,12 @@
|
||||
62ECBF361C0B6B7900AF847B /* HTMLKitDOMExceptions.m in Sources */,
|
||||
62ECBF371C0B6B7900AF847B /* NSString+HTMLKit.m in Sources */,
|
||||
62ECBF381C0B6B7900AF847B /* NSCharacterSet+HTMLKit.m in Sources */,
|
||||
627E60AC20B9C58F00AB06E8 /* HTMLElementPolicy.m in Sources */,
|
||||
62ECBF391C0B6B7900AF847B /* HTMLOrderedDictionary.m in Sources */,
|
||||
62ECBF3A1C0B6B7900AF847B /* CSSSelectors.m in Sources */,
|
||||
62ECBF3B1C0B6B7900AF847B /* CSSStructuralPseudoSelectors.m in Sources */,
|
||||
62ECBF3C1C0B6B7900AF847B /* CSSInputStream.m in Sources */,
|
||||
627E60CA20BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.m in Sources */,
|
||||
62ECBF3D1C0B6B7900AF847B /* CSSSelectorParser.m in Sources */,
|
||||
62ECBF3E1C0B6B7900AF847B /* CSSNthExpressionParser.m in Sources */,
|
||||
62ECBF3F1C0B6B7900AF847B /* CSSSelector.m in Sources */,
|
||||
@@ -1736,6 +1871,7 @@
|
||||
62ECBF471C0B6B7A00AF847B /* CSSCompoundSelector.m in Sources */,
|
||||
62567F521C0CB5750025D458 /* HTMLDOMTokenList.m in Sources */,
|
||||
624C777E1DE9D05E00DD6DFA /* HTMLCharacterData.m in Sources */,
|
||||
627E60C020BA015100AB06E8 /* HTMLSanitizingPolicy.m in Sources */,
|
||||
626BE1E61DF3819600C49514 /* HTMLDOMUtils.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -1745,6 +1881,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
62EC0A851E158BD80007786B /* HTMLRangeTests.m in Sources */,
|
||||
620AB7B12087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m in Sources */,
|
||||
62E0BA971E25456700E4D193 /* HTMLCharacterDataTests.m in Sources */,
|
||||
6216ACFD1C28DCC80074CAB4 /* CSSExtensionSelectorsParsingTests.m in Sources */,
|
||||
62132E5A1C01F83200084175 /* CSSSelectorTest.m in Sources */,
|
||||
@@ -1761,6 +1898,7 @@
|
||||
62567F561C0CC3AE0025D458 /* HTMLDOMTokenListTests.m in Sources */,
|
||||
624AC90219FBF9ED00BD3C4A /* HTMLKitTokenizerTests.m in Sources */,
|
||||
624B9FB31AE0313300646C4C /* HTMLStringCategoryTests.m in Sources */,
|
||||
62A95A4D1FB0FBFC0009FF26 /* HTMLSerializationTests.m in Sources */,
|
||||
623916C81AC7209E0066B4FE /* HTMLNodeIteratorTests.m in Sources */,
|
||||
62D8345A19FB1AC4009205A9 /* HTML5LibTokenizerTest.m in Sources */,
|
||||
6239755F1AC364BB007E26F1 /* HTML5LibTreeConstructionTest.m in Sources */,
|
||||
@@ -1780,6 +1918,8 @@
|
||||
62857CB31D398992008DC254 /* HTMLDocumentFragment.m in Sources */,
|
||||
62857CB61D398992008DC254 /* HTMLText.m in Sources */,
|
||||
62857C7D1D398912008DC254 /* HTMLToken.m in Sources */,
|
||||
62E2BC1420C0A93300979D71 /* HTMLTokenPolicy.m in Sources */,
|
||||
627E60A420B9C55400AB06E8 /* HTMLSanitizer.m in Sources */,
|
||||
62857CB41D398992008DC254 /* HTMLElement.m in Sources */,
|
||||
62857CCB1D3989B8008DC254 /* CSSSelector.m in Sources */,
|
||||
62857C8B1D39892D008DC254 /* HTMLParser.m in Sources */,
|
||||
@@ -1797,6 +1937,7 @@
|
||||
62857CCF1D3989B8008DC254 /* CSSPseudoClassSelector.m in Sources */,
|
||||
62857C7A1D398912008DC254 /* HTMLInputStreamReader.m in Sources */,
|
||||
62857CC11D39899C008DC254 /* NSCharacterSet+HTMLKit.m in Sources */,
|
||||
62A6CDD520BC9A3D00351AAE /* HTMLAttributePolicy.m in Sources */,
|
||||
62857CCD1D3989B8008DC254 /* CSSTypeSelector.m in Sources */,
|
||||
62857C8E1D39892D008DC254 /* HTMLMarker.m in Sources */,
|
||||
62857CB51D398992008DC254 /* HTMLComment.m in Sources */,
|
||||
@@ -1806,10 +1947,12 @@
|
||||
62857CC81D3989B8008DC254 /* CSSSelectorParser.m in Sources */,
|
||||
62857CBA1D398992008DC254 /* HTMLTreeWalker.m in Sources */,
|
||||
62857CE11D39A108008DC254 /* HTMLDocumentType.m in Sources */,
|
||||
627E60AF20B9C58F00AB06E8 /* HTMLElementPolicy.m in Sources */,
|
||||
62857CC71D3989AF008DC254 /* CSSStructuralPseudoSelectors.m in Sources */,
|
||||
62857C8D1D39892D008DC254 /* HTMLListOfActiveFormattingElements.m in Sources */,
|
||||
62857CB71D398992008DC254 /* HTMLTemplate.m in Sources */,
|
||||
62857CBC1D398992008DC254 /* HTMLNodeFilter.m in Sources */,
|
||||
627E60CD20BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.m in Sources */,
|
||||
62857CC01D39899C008DC254 /* NSString+HTMLKit.m in Sources */,
|
||||
62857CCA1D3989B8008DC254 /* CSSInputStream.m in Sources */,
|
||||
62857CCE1D3989B8008DC254 /* CSSAttributeSelector.m in Sources */,
|
||||
@@ -1823,6 +1966,7 @@
|
||||
62857CB81D398992008DC254 /* HTMLDOMTokenList.m in Sources */,
|
||||
62857C831D398912008DC254 /* HTMLEOFToken.m in Sources */,
|
||||
624C77811DE9D05E00DD6DFA /* HTMLCharacterData.m in Sources */,
|
||||
627E60C320BA015100AB06E8 /* HTMLSanitizingPolicy.m in Sources */,
|
||||
626BE1E91DF3819600C49514 /* HTMLDOMUtils.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -1835,6 +1979,8 @@
|
||||
62857D121D39A32A008DC254 /* HTMLDocumentFragment.m in Sources */,
|
||||
62857D151D39A32A008DC254 /* HTMLText.m in Sources */,
|
||||
62857D0B1D39A328008DC254 /* HTMLParser.m in Sources */,
|
||||
62E2BC1320C0A93300979D71 /* HTMLTokenPolicy.m in Sources */,
|
||||
627E60A320B9C55400AB06E8 /* HTMLSanitizer.m in Sources */,
|
||||
62857D131D39A32A008DC254 /* HTMLElement.m in Sources */,
|
||||
62857D251D39A334008DC254 /* CSSSelector.m in Sources */,
|
||||
62857D021D39A324008DC254 /* HTMLTokenizer.m in Sources */,
|
||||
@@ -1852,6 +1998,7 @@
|
||||
62857D291D39A334008DC254 /* CSSPseudoClassSelector.m in Sources */,
|
||||
62857D011D39A324008DC254 /* HTMLInputStreamReader.m in Sources */,
|
||||
62857D1E1D39A334008DC254 /* NSCharacterSet+HTMLKit.m in Sources */,
|
||||
62A6CDD420BC9A3D00351AAE /* HTMLAttributePolicy.m in Sources */,
|
||||
62857D271D39A334008DC254 /* CSSTypeSelector.m in Sources */,
|
||||
62857D0E1D39A328008DC254 /* HTMLMarker.m in Sources */,
|
||||
62857D071D39A324008DC254 /* HTMLDOCTYPEToken.m in Sources */,
|
||||
@@ -1861,10 +2008,12 @@
|
||||
62857D0D1D39A328008DC254 /* HTMLListOfActiveFormattingElements.m in Sources */,
|
||||
62857D221D39A334008DC254 /* CSSSelectorParser.m in Sources */,
|
||||
62857D191D39A32A008DC254 /* HTMLTreeWalker.m in Sources */,
|
||||
627E60AE20B9C58F00AB06E8 /* HTMLElementPolicy.m in Sources */,
|
||||
62857D211D39A334008DC254 /* CSSStructuralPseudoSelectors.m in Sources */,
|
||||
62857D091D39A324008DC254 /* HTMLTagToken.m in Sources */,
|
||||
62857D161D39A32A008DC254 /* HTMLTemplate.m in Sources */,
|
||||
62857D1B1D39A32A008DC254 /* HTMLNodeFilter.m in Sources */,
|
||||
627E60CC20BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.m in Sources */,
|
||||
62857D1D1D39A334008DC254 /* NSString+HTMLKit.m in Sources */,
|
||||
62857D241D39A334008DC254 /* CSSInputStream.m in Sources */,
|
||||
62857D281D39A334008DC254 /* CSSAttributeSelector.m in Sources */,
|
||||
@@ -1878,6 +2027,7 @@
|
||||
62857D171D39A32A008DC254 /* HTMLDOMTokenList.m in Sources */,
|
||||
62857D0A1D39A324008DC254 /* HTMLEOFToken.m in Sources */,
|
||||
624C77801DE9D05E00DD6DFA /* HTMLCharacterData.m in Sources */,
|
||||
627E60C220BA015100AB06E8 /* HTMLSanitizingPolicy.m in Sources */,
|
||||
626BE1E81DF3819600C49514 /* HTMLDOMUtils.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -1887,6 +2037,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
62EC0A871E158BD80007786B /* HTMLRangeTests.m in Sources */,
|
||||
620AB7B32087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m in Sources */,
|
||||
62E0BA991E25456700E4D193 /* HTMLCharacterDataTests.m in Sources */,
|
||||
62857D3B1D39A345008DC254 /* CSSSelectorTest.m in Sources */,
|
||||
62857D421D39A345008DC254 /* CSSCombinatorSelectorTests.m in Sources */,
|
||||
@@ -1903,6 +2054,7 @@
|
||||
62857D401D39A345008DC254 /* CSSAttributeSelectorTests.m in Sources */,
|
||||
62857D311D39A33C008DC254 /* HTML5LibTreeConstructionTest.m in Sources */,
|
||||
62857D391D39A342008DC254 /* HTMLOrderedDictionaryTests.m in Sources */,
|
||||
62A95A4F1FB0FBFC0009FF26 /* HTMLSerializationTests.m in Sources */,
|
||||
62857D411D39A345008DC254 /* CSSNThExpressionSelectorTests.m in Sources */,
|
||||
62857D381D39A342008DC254 /* HTMLStringCategoryTests.m in Sources */,
|
||||
62857D331D39A33C008DC254 /* HTMLKitParserPerformance.m in Sources */,
|
||||
@@ -1922,6 +2074,8 @@
|
||||
62ECBF651C0B6D2A00AF847B /* HTMLTokenizer.m in Sources */,
|
||||
62ECBF661C0B6D2A00AF847B /* HTMLTokenizerEntities.m in Sources */,
|
||||
62ECBF671C0B6D2A00AF847B /* HTMLToken.m in Sources */,
|
||||
62E2BC1220C0A93300979D71 /* HTMLTokenPolicy.m in Sources */,
|
||||
627E60A220B9C55400AB06E8 /* HTMLSanitizer.m in Sources */,
|
||||
62ECBF681C0B6D2A00AF847B /* HTMLCharacterToken.m in Sources */,
|
||||
62ECBF691C0B6D2A00AF847B /* HTMLCommentToken.m in Sources */,
|
||||
62ECBF6A1C0B6D2A00AF847B /* HTMLDOCTYPEToken.m in Sources */,
|
||||
@@ -1939,6 +2093,7 @@
|
||||
62ECBF751C0B6D2A00AF847B /* HTMLDocumentFragment.m in Sources */,
|
||||
62ECBF761C0B6D2A00AF847B /* HTMLElement.m in Sources */,
|
||||
62ECBF771C0B6D2A00AF847B /* HTMLComment.m in Sources */,
|
||||
62A6CDD320BC9A3D00351AAE /* HTMLAttributePolicy.m in Sources */,
|
||||
62ECBF781C0B6D2A00AF847B /* HTMLText.m in Sources */,
|
||||
62ECBF791C0B6D2A00AF847B /* HTMLTemplate.m in Sources */,
|
||||
62ECBF7A1C0B6D2A00AF847B /* HTMLNodeIterator.m in Sources */,
|
||||
@@ -1948,10 +2103,12 @@
|
||||
62ECBF7E1C0B6D2A00AF847B /* HTMLKitDOMExceptions.m in Sources */,
|
||||
62ECBF7F1C0B6D2A00AF847B /* NSString+HTMLKit.m in Sources */,
|
||||
62ECBF801C0B6D2A00AF847B /* NSCharacterSet+HTMLKit.m in Sources */,
|
||||
627E60AD20B9C58F00AB06E8 /* HTMLElementPolicy.m in Sources */,
|
||||
62ECBF811C0B6D2A00AF847B /* HTMLOrderedDictionary.m in Sources */,
|
||||
62ECBF821C0B6D2A00AF847B /* CSSSelectors.m in Sources */,
|
||||
62ECBF831C0B6D2A00AF847B /* CSSStructuralPseudoSelectors.m in Sources */,
|
||||
62ECBF841C0B6D2A00AF847B /* CSSInputStream.m in Sources */,
|
||||
627E60CB20BA02E900AB06E8 /* HTMLSanitizingPolicyBuilder.m in Sources */,
|
||||
62ECBF851C0B6D2A00AF847B /* CSSSelectorParser.m in Sources */,
|
||||
62ECBF861C0B6D2A00AF847B /* CSSNthExpressionParser.m in Sources */,
|
||||
62ECBF871C0B6D2A00AF847B /* CSSSelector.m in Sources */,
|
||||
@@ -1965,6 +2122,7 @@
|
||||
62ECBF8F1C0B6D2A00AF847B /* CSSCompoundSelector.m in Sources */,
|
||||
62567F531C0CB5750025D458 /* HTMLDOMTokenList.m in Sources */,
|
||||
624C777F1DE9D05E00DD6DFA /* HTMLCharacterData.m in Sources */,
|
||||
627E60C120BA015100AB06E8 /* HTMLSanitizingPolicy.m in Sources */,
|
||||
626BE1E71DF3819600C49514 /* HTMLDOMUtils.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -1974,6 +2132,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
62EC0A861E158BD80007786B /* HTMLRangeTests.m in Sources */,
|
||||
620AB7B22087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m in Sources */,
|
||||
62E0BA981E25456700E4D193 /* HTMLCharacterDataTests.m in Sources */,
|
||||
6216ACFE1C28DCC80074CAB4 /* CSSExtensionSelectorsParsingTests.m in Sources */,
|
||||
62ECBFCA1C0B6E2E00AF847B /* HTML5LibTokenizerTest.m in Sources */,
|
||||
@@ -1990,6 +2149,7 @@
|
||||
62567F571C0CC3AE0025D458 /* HTMLDOMTokenListTests.m in Sources */,
|
||||
62ECBFD41C0B6E2E00AF847B /* HTMLStringCategoryTests.m in Sources */,
|
||||
62ECBFD51C0B6E2E00AF847B /* HTMLOrderedDictionaryTests.m in Sources */,
|
||||
62A95A4E1FB0FBFC0009FF26 /* HTMLSerializationTests.m in Sources */,
|
||||
62ECBFD61C0B6E2E00AF847B /* CSSSelectorTest.m in Sources */,
|
||||
62ECBFD71C0B6E2E00AF847B /* CSSSelectorParserTests.m in Sources */,
|
||||
62ECBFD81C0B6E2E00AF847B /* CSSNthExpressionsParserTests.m in Sources */,
|
||||
@@ -2118,6 +2278,7 @@
|
||||
625A14D519C7829400AD0C32 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
@@ -2127,8 +2288,10 @@
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
INFOPLIST_FILE = "Sources/HTMLKit-Info.plist";
|
||||
INSTALL_PATH = "@rpath";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
@@ -2143,6 +2306,7 @@
|
||||
625A14D619C7829400AD0C32 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
@@ -2152,8 +2316,10 @@
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
INFOPLIST_FILE = "Sources/HTMLKit-Info.plist";
|
||||
INSTALL_PATH = "@rpath";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
@@ -2218,6 +2384,7 @@
|
||||
buildSettings = {
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
@@ -2229,7 +2396,9 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
INFOPLIST_FILE = "Sources/HTMLKit-Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
@@ -2253,6 +2422,7 @@
|
||||
buildSettings = {
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
@@ -2264,7 +2434,9 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
INFOPLIST_FILE = "Sources/HTMLKit-Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
@@ -2288,6 +2460,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=*]" = "iPhone Developer";
|
||||
@@ -2301,7 +2474,9 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
INFOPLIST_FILE = "Sources/HTMLKit-Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
@@ -2323,6 +2498,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=*]" = "iPhone Developer";
|
||||
@@ -2336,7 +2512,9 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
INFOPLIST_FILE = "Sources/HTMLKit-Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
@@ -2399,6 +2577,7 @@
|
||||
62ECBF5F1C0B6C7600AF847B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
@@ -2411,8 +2590,10 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
GCC_WARN_INHIBIT_ALL_WARNINGS = NO;
|
||||
GCC_WARN_PEDANTIC = NO;
|
||||
INFOPLIST_FILE = "Sources/HTMLKit-Info.plist";
|
||||
@@ -2435,6 +2616,7 @@
|
||||
62ECBF601C0B6C7600AF847B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
@@ -2447,8 +2629,10 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
GCC_WARN_INHIBIT_ALL_WARNINGS = NO;
|
||||
GCC_WARN_PEDANTIC = NO;
|
||||
INFOPLIST_FILE = "Sources/HTMLKit-Info.plist";
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
An Objective-C framework for your everyday HTML needs.
|
||||
|
||||
[](https://travis-ci.org/iabudiab/HTMLKit)
|
||||
[](https://codecov.io/gh/iabudiab/HTMLKit)
|
||||
[](https://travis-ci.org/iabudiab/HTMLKit)
|
||||
[](https://codecov.io/gh/iabudiab/HTMLKit)
|
||||
[](https://github.com/Carthage/Carthage)
|
||||
[](https://cocoapods.org/pods/HTMLKit)
|
||||
[](http://cocoadocs.org/docsets/HTMLKit)
|
||||
@@ -76,10 +76,8 @@ $ gem install cocoapods
|
||||
To add `HTMLKit` as a dependency into your project using CocoaPods just add the following in your `Podfile`:
|
||||
|
||||
```ruby
|
||||
use_frameworks!
|
||||
|
||||
target 'MyTarget' do
|
||||
pod 'HTMLKit', '~> 2.0'
|
||||
pod 'HTMLKit', '~> 2.1'
|
||||
end
|
||||
```
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ NSString * _Nonnull NSStringFromNthExpression(CSSNthExpression expression)
|
||||
|
||||
#pragma mark - Implementation
|
||||
|
||||
NSInteger computeIndex(NSEnumerator *enumerator, HTMLElement *element)
|
||||
NS_INLINE NSInteger computeIndex(NSEnumerator *enumerator, HTMLElement *element)
|
||||
{
|
||||
NSInteger index = 0;
|
||||
for (HTMLNode *node in enumerator) {
|
||||
|
||||
@@ -276,7 +276,7 @@ CSSSelector * ltSelector(NSInteger index)
|
||||
return namedBlockSelector(name, ^BOOL(HTMLElement * _Nonnull element) {
|
||||
NSUInteger elementIndex = [element.parentElement indexOfChildNode:element];
|
||||
|
||||
if (index > 0) {
|
||||
if (index >= 0) {
|
||||
return elementIndex < index;
|
||||
} else {
|
||||
return elementIndex < element.parentElement.childNodesCount - index - 1;
|
||||
@@ -290,7 +290,7 @@ CSSSelector * gtSelector(NSInteger index)
|
||||
return namedBlockSelector(name, ^BOOL(HTMLElement * _Nonnull element) {
|
||||
NSUInteger elementIndex = [element.parentElement indexOfChildNode:element];
|
||||
|
||||
if (index > 0) {
|
||||
if (index >= 0) {
|
||||
return elementIndex > index;
|
||||
} else {
|
||||
return elementIndex > element.parentElement.childNodesCount - index - 1;
|
||||
@@ -304,7 +304,7 @@ CSSSelector * eqSelector(NSInteger index)
|
||||
return namedBlockSelector(name, ^BOOL(HTMLElement * _Nonnull element) {
|
||||
NSUInteger elementIndex = [element.parentElement indexOfChildNode:element];
|
||||
|
||||
if (index > 0) {
|
||||
if (index >= 0) {
|
||||
return elementIndex == index;
|
||||
} else {
|
||||
return elementIndex == element.parentElement.childNodesCount - index - 1;
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// HTMLAttributePolicy.h
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 28.05.18.
|
||||
// Copyright © 2018 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NSString * _Nullable (^ SanitizeAttrbiuteValueBlock) (NSString * _Nullable value, NSString * key);
|
||||
|
||||
@interface HTMLAttributePolicy : NSObject
|
||||
|
||||
+ (instancetype)identity;
|
||||
+ (instancetype)rejectAll;
|
||||
+ (instancetype)policyWithBlock:(SanitizeAttrbiuteValueBlock)block;
|
||||
|
||||
- (NSString *)sanitizeValue:(NSString *)value forKey:(NSString *)key;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// HTMLAttributePolicy.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 28.05.18.
|
||||
// Copyright © 2018 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import "HTMLAttributePolicy.h"
|
||||
|
||||
@interface HTMLAttributePolicy()
|
||||
{
|
||||
SanitizeAttrbiuteValueBlock _block;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation HTMLAttributePolicy
|
||||
|
||||
+ (instancetype)identity
|
||||
{
|
||||
return [self policyWithBlock:^NSString * _Nullable (NSString * _Nullable value, NSString * _Nonnull key) {
|
||||
return value;
|
||||
}];
|
||||
}
|
||||
|
||||
+ (instancetype)rejectAll
|
||||
{
|
||||
return [self policyWithBlock:^NSString * _Nullable (NSString * _Nullable value, NSString * _Nonnull key) {
|
||||
return nil;
|
||||
}];
|
||||
}
|
||||
|
||||
+ (instancetype)policyWithBlock:(SanitizeAttrbiuteValueBlock)block
|
||||
{
|
||||
HTMLAttributePolicy *policy = [[HTMLAttributePolicy alloc] initWithBlock:block];
|
||||
return policy;
|
||||
}
|
||||
|
||||
- (instancetype)initWithBlock:(SanitizeAttrbiuteValueBlock)block
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_block = block;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString *)sanitizeValue:(NSString *)value forKey:(NSString *)key
|
||||
{
|
||||
if (_block) {
|
||||
return _block(value, key);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -144,7 +144,7 @@
|
||||
{
|
||||
HTMLElement *copy = [super copyWithZone:zone];
|
||||
copy->_tagName = [_tagName copy];
|
||||
copy->_attributes = [_attributes copy];
|
||||
copy->_attributes = [_attributes mutableCopy];
|
||||
copy->_htmlNamespace = _htmlNamespace;
|
||||
return copy;
|
||||
}
|
||||
@@ -157,11 +157,10 @@
|
||||
|
||||
[result appendFormat:@"<%@", self.tagName];
|
||||
[self.attributes enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL *stop) {
|
||||
NSRange range = NSMakeRange(0, value.length);
|
||||
NSMutableString *escaped = [value mutableCopy];
|
||||
[escaped replaceOccurrencesOfString:@"&" withString:@"&" options:0 range:range];
|
||||
[escaped replaceOccurrencesOfString:@"\00A0" withString:@" " options:0 range:range];
|
||||
[escaped replaceOccurrencesOfString:@"\"" withString:@""" options:0 range:range];
|
||||
[escaped replaceOccurrencesOfString:@"&" withString:@"&" options:0 range:NSMakeRange(0, escaped.length)];
|
||||
[escaped replaceOccurrencesOfString:@"0x00A0" withString:@" " options:0 range:NSMakeRange(0, escaped.length)];
|
||||
[escaped replaceOccurrencesOfString:@"\"" withString:@""" options:0 range:NSMakeRange(0, escaped.length)];
|
||||
|
||||
[result appendFormat:@" %@=\"%@\"", key, escaped];
|
||||
}];
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// HTMLElementPolicy.h
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 26.05.18.
|
||||
// Copyright © 2018 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "HTMLSanitizingPolicy.h"
|
||||
#import "HTMLOrderedDictionary.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NSString * _Nullable (^ SanitizeElementNameBlock) (NSString *);
|
||||
typedef HTMLOrderedDictionary * _Nullable (^ SanitizeElementAttributesBlock) (HTMLOrderedDictionary * _Nullable);
|
||||
|
||||
@interface HTMLElementPolicy : NSObject
|
||||
|
||||
+ (instancetype)identity;
|
||||
+ (instancetype)rejectAll;
|
||||
+ (instancetype)policyWithNameBlock:(SanitizeElementNameBlock)nameBlock;
|
||||
+ (instancetype)policyWithNameBlock:(SanitizeElementNameBlock)nameBlock
|
||||
attributesBlock:(nullable SanitizeElementAttributesBlock)attributesBlock;
|
||||
|
||||
- (NSString *)sanitizeName:(NSString *)name;
|
||||
- (HTMLOrderedDictionary *)sanitzeAttributes:(HTMLOrderedDictionary *)attributes;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// HTMLElementPolicy.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 26.05.18.
|
||||
// Copyright © 2018 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import "HTMLElementPolicy.h"
|
||||
|
||||
@interface HTMLElementPolicy()
|
||||
{
|
||||
SanitizeElementNameBlock _nameBlock;
|
||||
SanitizeElementAttributesBlock _attributesBlock;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation HTMLElementPolicy
|
||||
|
||||
+ (instancetype)identity
|
||||
{
|
||||
return [self policyWithNameBlock:^NSString * _Nullable (NSString * _Nonnull name) {
|
||||
return name;
|
||||
}];
|
||||
}
|
||||
|
||||
+ (instancetype)rejectAll
|
||||
{
|
||||
return [self policyWithNameBlock:^NSString *_Nullable (NSString * _Nonnull name) {
|
||||
return nil;
|
||||
}];
|
||||
}
|
||||
|
||||
+ (instancetype)policyWithNameBlock:(NSString * _Nonnull (^)(NSString * _Nonnull))nameBlock
|
||||
{
|
||||
return [self policyWithNameBlock:nameBlock attributesBlock:nil];
|
||||
}
|
||||
|
||||
+ (instancetype)policyWithNameBlock:(SanitizeElementNameBlock)nameBlock
|
||||
attributesBlock:(SanitizeElementAttributesBlock)attributesBlock
|
||||
{
|
||||
HTMLElementPolicy *policy = [[HTMLElementPolicy alloc] initWithNameBlock:nameBlock attributesBlock:attributesBlock];
|
||||
return policy;
|
||||
}
|
||||
|
||||
- (instancetype)initWithNameBlock:(SanitizeElementNameBlock)nameBlock
|
||||
attributesBlock:(SanitizeElementAttributesBlock)attributesBlock
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_nameBlock = nameBlock;
|
||||
_attributesBlock = attributesBlock;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString *)sanitizeName:(NSString *)name
|
||||
{
|
||||
if (_nameBlock) {
|
||||
return _nameBlock(name);
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
- (HTMLOrderedDictionary *)sanitzeAttributes:(HTMLOrderedDictionary *)attributes
|
||||
{
|
||||
if (_attributesBlock) {
|
||||
return _attributesBlock(attributes);
|
||||
}
|
||||
return attributes;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -17,7 +17,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.1.1</string>
|
||||
<string>2.1.4</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
||||
+1
-1
@@ -127,7 +127,7 @@ NSString * const RemoveChildNode = @"-removeChildNode:";
|
||||
|
||||
- (HTMLElement *)nextSiblingElement
|
||||
{
|
||||
HTMLNode *node = self.previousSibling;
|
||||
HTMLNode *node = self.nextSibling;
|
||||
while (node && node.nodeType != HTMLNodeElement) {
|
||||
node = node.nextSibling;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
@interface HTMLNodeFilterBlock ()
|
||||
{
|
||||
BOOL (^ _block)(HTMLNode *);
|
||||
HTMLNodeFilterValue (^ _block)(HTMLNode *);
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@@ -154,4 +154,11 @@
|
||||
return [_keys countByEnumeratingWithState:state objects:buffer count:len];
|
||||
}
|
||||
|
||||
#pragma mark - Copying
|
||||
|
||||
- (id)mutableCopy
|
||||
{
|
||||
return [[HTMLOrderedDictionary alloc] initWithDictionary:self];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -1443,7 +1443,6 @@
|
||||
} else if ([tagName isEqualToString:@"math"]) {
|
||||
[self reconstructActiveFormattingElements];
|
||||
AdjustMathMLAttributes(token);
|
||||
AdjustForeignAttributes(token);
|
||||
[self insertForeignElementForToken:token inNamespace:HTMLNamespaceMathML];
|
||||
if (token.isSelfClosing) {
|
||||
[_stackOfOpenElements popCurrentNode];
|
||||
@@ -1451,7 +1450,6 @@
|
||||
} else if ([tagName isEqualToString:@"svg"]) {
|
||||
[self reconstructActiveFormattingElements];
|
||||
AdjustSVGAttributes(token);
|
||||
AdjustForeignAttributes(token);
|
||||
[self insertForeignElementForToken:token inNamespace:HTMLNamespaceSVG];
|
||||
if (token.isSelfClosing) {
|
||||
[_stackOfOpenElements popCurrentNode];
|
||||
@@ -2541,7 +2539,6 @@
|
||||
AdjustSVGNameCase(token.asTagToken);
|
||||
AdjustSVGAttributes(token.asTagToken);
|
||||
}
|
||||
AdjustForeignAttributes(token.asTagToken);
|
||||
[self insertForeignElementForToken:token.asTagToken inNamespace:self.adjustedCurrentNode.htmlNamespace];
|
||||
if (token.asTagToken.selfClosing) {
|
||||
[_stackOfOpenElements popCurrentNode];
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// HTMLSanitizer.h
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 26.05.18.
|
||||
// Copyright © 2018 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "HTMLSanitizingPolicyBuilder.h"
|
||||
#import "HTMLSanitizingPolicy.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface HTMLSanitizer : NSObject
|
||||
|
||||
+ (instancetype)sanitizerWithPolicy:(void (^)(HTMLSanitizingPolicyBuilder *))block;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// HTMLSanitizer.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 26.05.18.
|
||||
// Copyright © 2018 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import "HTMLSanitizer.h"
|
||||
#import "HTMLTokenizer.h"
|
||||
#import "HTMLTokens.h"
|
||||
|
||||
@interface HTMLSanitizer()
|
||||
{
|
||||
HTMLTokenizer *_tokenizer;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation HTMLSanitizer
|
||||
|
||||
+ (instancetype)sanitizerWithPolicy:(void (^)(HTMLSanitizingPolicyBuilder *))block
|
||||
{
|
||||
HTMLSanitizingPolicyBuilder *builder = [HTMLSanitizingPolicyBuilder new];
|
||||
block(builder);
|
||||
return nil; //[[HTMLSanitizingPolicy alloc] initWithBuilder:builder];
|
||||
}
|
||||
|
||||
- (instancetype)initWithString:(NSString *)string
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_tokenizer = [[HTMLTokenizer alloc] initWithString:string ?: @""];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)sanitize
|
||||
{
|
||||
// for (HTMLToken *token in _tokenizer) {
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// HTMLSanitizingPolicy.h
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 26.05.18.
|
||||
// Copyright © 2018 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface HTMLSanitizingPolicy : NSObject
|
||||
|
||||
- (HTMLSanitizingPolicy *)combineWith:(nullable HTMLSanitizingPolicy *)other;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// HTMLSanitizingPolicy.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 26.05.18.
|
||||
// Copyright © 2018 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import "HTMLSanitizingPolicy.h"
|
||||
|
||||
@interface HTMLSanitizingPolicy()
|
||||
{
|
||||
NSMutableArray *_policies;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation HTMLSanitizingPolicy
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_policies = [NSMutableArray new];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (HTMLSanitizingPolicy *)combineWith:(HTMLSanitizingPolicy *)other
|
||||
{
|
||||
if (other) {
|
||||
[_policies addObject:other];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// HTMLSanitizingPolicyBuilder.h
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 26.05.18.
|
||||
// Copyright © 2018 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "HTMLElementPolicy.h"
|
||||
#import "HTMLTokenPolicy.h"
|
||||
#import "HTMLAttributePolicy.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface HTMLSanitizingPolicyBuilder : NSObject
|
||||
|
||||
- (HTMLSanitizingPolicyBuilder *)allowElements:(NSArray<NSString *> *)elementNames;
|
||||
- (HTMLSanitizingPolicyBuilder *)disallowElements:(NSArray<NSString *> *)elementNames;
|
||||
- (HTMLSanitizingPolicyBuilder *)allowPolicy:(HTMLElementPolicy *)policy onElements:(NSArray<NSString *> *)elementNames;
|
||||
- (HTMLSanitizingPolicyBuilder *)allowCommonInlineFormattingElements;
|
||||
- (HTMLSanitizingPolicyBuilder *)allowCommonBlockElements;
|
||||
- (HTMLSanitizingPolicyBuilder *)allowTextInElements:(NSArray<NSString *> *)elementNames;
|
||||
- (HTMLSanitizingPolicyBuilder *)disallowTextInElements:(NSArray<NSString *> *)elementNames;
|
||||
|
||||
//- (HTMLSanitizingPolicyBuilder *)allowAttributes:(NSArray<NSString *> *)attributeName
|
||||
// onElements:(NSArray<NSString *> *)elementNames;
|
||||
//- (HTMLSanitizingPolicyBuilder *)disallowAttributes:(NSArray<NSString *> *)attributeName
|
||||
// onElements:(NSArray<NSString *> *)elementNames;
|
||||
//
|
||||
//- (HTMLSanitizingPolicyBuilder *)allowAttributePolicy:(HTMLAttributePolicy *)policy
|
||||
// onElements:(NSArray<NSString *> *)elementNames;
|
||||
//- (HTMLSanitizingPolicyBuilder *)disallowAttributePolicy:(HTMLAttributePolicy *)policy
|
||||
// onElements:(NSArray<NSString *> *)elementNames;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,94 @@
|
||||
//
|
||||
// HTMLSanitizingPolicyBuilder.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 26.05.18.
|
||||
// Copyright © 2018 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import "HTMLSanitizingPolicyBuilder.h"
|
||||
|
||||
@interface HTMLSanitizingPolicyBuilder()
|
||||
{
|
||||
NSMutableDictionary<NSString *, NSMutableArray<HTMLElementPolicy *> *> * elementPolicies;
|
||||
NSMutableDictionary<NSString *, HTMLAttributePolicy *> * attributePolicies;
|
||||
NSMutableDictionary<NSString *, NSNumber *> * textContainers;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation HTMLSanitizingPolicyBuilder
|
||||
|
||||
- (HTMLSanitizingPolicyBuilder *)allowElements:(NSArray<NSString *> *)elementNames
|
||||
{
|
||||
return [self allowPolicy:HTMLElementPolicy.identity onElements:elementNames];
|
||||
}
|
||||
|
||||
- (HTMLSanitizingPolicyBuilder *)disallowElements:(NSArray<NSString *> *)elementNames
|
||||
{
|
||||
return [self allowPolicy:HTMLElementPolicy.rejectAll onElements:elementNames];
|
||||
}
|
||||
|
||||
- (HTMLSanitizingPolicyBuilder *)allowPolicy:(HTMLElementPolicy *)policy onElements:(NSArray<NSString *> *)elementNames
|
||||
{
|
||||
for (NSString *name in elementNames) {
|
||||
NSMutableArray<HTMLElementPolicy *> *list = elementPolicies[name];
|
||||
if (list == nil) {
|
||||
list = [NSMutableArray new];
|
||||
}
|
||||
[list addObject:policy];
|
||||
elementPolicies[name] = list;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (HTMLSanitizingPolicyBuilder *)allowCommonInlineFormattingElements
|
||||
{
|
||||
return [self allowElements:@[@"b", @"i", @"font", @"s", @"u", @"o", @"sup", @"sub", @"ins", @"del",
|
||||
@"strong", @"strike", @"tt", @"code", @"big", @"small", @"br", @"span", @"em"]];
|
||||
}
|
||||
|
||||
- (HTMLSanitizingPolicyBuilder *)allowCommonBlockElements
|
||||
{
|
||||
return [self allowElements:@[@"p", @"div", @"h1", @"h2", @"h3", @"h4", @"h5", @"h6", @"ul", @"ol", @"li",
|
||||
@"blockquote"]];
|
||||
}
|
||||
|
||||
- (HTMLSanitizingPolicyBuilder *)allowTextInElements:(NSArray<NSString *> *)elementNames;
|
||||
{
|
||||
for (NSString *name in elementNames) {
|
||||
textContainers[name] = @YES;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (HTMLSanitizingPolicyBuilder *)disallowTextInElements:(NSArray<NSString *> *)elementNames
|
||||
{
|
||||
for (NSString *name in elementNames) {
|
||||
textContainers[name] = @NO;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
//- (HTMLSanitizingPolicyBuilder *)allowAttributes:(NSArray<NSString *> *)attributeNames
|
||||
// onElements:(NSArray<NSString *> *)elementNames
|
||||
//{
|
||||
// for (NSString *attribute in attributeNames) {
|
||||
// [self allowAttributePolicy:HTMLAttributePolicy.identity onElements:elementNames];
|
||||
// }
|
||||
// return self;
|
||||
//}
|
||||
//
|
||||
//- (HTMLSanitizingPolicyBuilder *)disallowAttributes:(NSArray<NSString *> *)attributeName
|
||||
// onElements:(NSArray<NSString *> *)elementNames;
|
||||
//
|
||||
//- (HTMLSanitizingPolicyBuilder *)allowAttributePolicy:(HTMLAttributePolicy *)policy onElements:(NSArray<NSString *> *)elementNames
|
||||
//{
|
||||
// return self;
|
||||
//}
|
||||
//
|
||||
//- (HTMLSanitizingPolicyBuilder *)disallowAttributePolicy:(HTMLAttributePolicy *)policy onElements:(NSArray<NSString *> *)elementNames
|
||||
//{
|
||||
// return self;
|
||||
//}
|
||||
|
||||
@end
|
||||
+4
-5
@@ -74,12 +74,11 @@ NS_INLINE void CheckValidOffset(HTMLNode *node, NSUInteger offset, NSString *cmd
|
||||
@"plaintext", @"noscript", nil]) {
|
||||
return self.data;
|
||||
} else {
|
||||
NSRange range = NSMakeRange(0, self.data.length);
|
||||
NSMutableString *escaped = [self.data mutableCopy];
|
||||
[escaped replaceOccurrencesOfString:@"&" withString:@"&" options:0 range:range];
|
||||
[escaped replaceOccurrencesOfString:@"\00A0" withString:@" " options:0 range:range];
|
||||
[escaped replaceOccurrencesOfString:@"<" withString:@"<" options:0 range:range];
|
||||
[escaped replaceOccurrencesOfString:@">" withString:@">" options:0 range:range];
|
||||
[escaped replaceOccurrencesOfString:@"&" withString:@"&" options:0 range:NSMakeRange(0, escaped.length)];
|
||||
[escaped replaceOccurrencesOfString:@"\00A0" withString:@" " options:0 range:NSMakeRange(0, escaped.length)];
|
||||
[escaped replaceOccurrencesOfString:@"<" withString:@"<" options:0 range:NSMakeRange(0, escaped.length)];
|
||||
[escaped replaceOccurrencesOfString:@">" withString:@">" options:0 range:NSMakeRange(0, escaped.length)];
|
||||
return escaped;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// HTMLTokenPolicy.h
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 01.06.18.
|
||||
// Copyright © 2018 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "HTMLTokens.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface HTMLTokenPolicy : NSObject
|
||||
|
||||
+ (instancetype)policy:(HTMLToken * _Nullable (^)(HTMLToken *))block;
|
||||
|
||||
- (nullable HTMLToken *)apply:(HTMLToken *)token;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// HTMLTokenPolicy.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 01.06.18.
|
||||
// Copyright © 2018 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import "HTMLTokenPolicy.h"
|
||||
|
||||
@interface HTMLTokenPolicy()
|
||||
{
|
||||
HTMLToken * (^ _policyBlock)(HTMLToken *);
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation HTMLTokenPolicy
|
||||
|
||||
+ (instancetype)policy:(HTMLToken * _Nullable (^)(HTMLToken * _Nonnull))block
|
||||
{
|
||||
return [[HTMLTokenPolicy alloc] initWithBlock:block];
|
||||
}
|
||||
|
||||
- (instancetype)initWithBlock:(HTMLToken * _Nullable (^)(HTMLToken * _Nonnull))block
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_policyBlock = block;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (HTMLToken *)apply:(HTMLToken *)token
|
||||
{
|
||||
return _policyBlock(token);
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -58,4 +58,15 @@ NS_INLINE BOOL isHtmlWhitespaceChar(unichar c)
|
||||
return idx;
|
||||
}
|
||||
|
||||
- (NSString *)stringByEscapingForHTML
|
||||
{
|
||||
NSMutableString *escaped = [self mutableCopy];
|
||||
[escaped replaceOccurrencesOfString:@"&" withString:@"&" options:0 range:NSMakeRange(0, escaped.length)];
|
||||
[escaped replaceOccurrencesOfString:@"0x00A0" withString:@" " options:0 range:NSMakeRange(0, escaped.length)];
|
||||
[escaped replaceOccurrencesOfString:@"\"" withString:@""" options:0 range:NSMakeRange(0, escaped.length)];
|
||||
[escaped replaceOccurrencesOfString:@"<" withString:@"<" options:0 range:NSMakeRange(0, escaped.length)];
|
||||
[escaped replaceOccurrencesOfString:@">" withString:@">" options:0 range:NSMakeRange(0, escaped.length)];
|
||||
return escaped;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
Initializes and returns a CSS has-descendant selector, e.g. 'div:has(p)'
|
||||
|
||||
@discussion 'div:has(p)' matches all <div> elements which have a descendant <p> element.
|
||||
@discussion 'div:has(p)' matches all <div> elements which have a descendant <p> element.
|
||||
|
||||
@param selector The selector matching a descendant element.
|
||||
@return A new instance of the has-descendant selector.
|
||||
|
||||
@@ -76,7 +76,7 @@ extern NSString * _Nonnull NSStringFromNthExpression(CSSNthExpression expression
|
||||
@param string The selector string which will be parsed.
|
||||
@return A new instance of a parsed CSS Selector, `nil` if the string is not a valid selector string.
|
||||
*/
|
||||
+ (nullable instancetype)selectorWithString:(NSString *)stirng;
|
||||
+ (nullable instancetype)selectorWithString:(NSString *)string;
|
||||
|
||||
/**
|
||||
Implementations should override this method to provide the selector-sprecific logic for matching elements.
|
||||
|
||||
@@ -225,7 +225,7 @@ extern CSSSelector * not(CSSSelector *selector);
|
||||
/**
|
||||
CSS has-descendant selector, e.g. 'div:has(p)'
|
||||
|
||||
@discussion 'div:has(p)' matches all <div> elements which have a descendant <p> element.
|
||||
@discussion 'div:has(p)' matches all <div> elements which have a descendant <p> element.
|
||||
|
||||
@param selector The selector matching a descendant element.
|
||||
@return A has-descendant selector.
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
// Copyright (c) 2014 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
///------------------------------------------------------
|
||||
/// HTMLKit private header
|
||||
///------------------------------------------------------
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "HTMLToken.h"
|
||||
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
// Copyright (c) 2014 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
///------------------------------------------------------
|
||||
/// HTMLKit private header
|
||||
///------------------------------------------------------
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "HTMLToken.h"
|
||||
|
||||
@@ -24,7 +20,7 @@
|
||||
/**
|
||||
Initializes a new comment token.
|
||||
|
||||
@param string The string with which to initialize the token.
|
||||
@param data The string with which to initialize the token.
|
||||
@return A new instance of a comment token.
|
||||
*/
|
||||
- (instancetype)initWithData:(NSString *)data;
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
// Copyright (c) 2014 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
///------------------------------------------------------
|
||||
/// HTMLKit private header
|
||||
///------------------------------------------------------
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "HTMLToken.h"
|
||||
|
||||
|
||||
@@ -24,3 +24,5 @@
|
||||
#import "HTMLKitDOMExceptions.h"
|
||||
#import "HTMLNamespaces.h"
|
||||
#import "HTMLQuirksMode.h"
|
||||
|
||||
#import "HTMLOrderedDictionary.h"
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
// Copyright (c) 2015 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
///------------------------------------------------------
|
||||
/// HTMLKit private header
|
||||
///------------------------------------------------------
|
||||
|
||||
#import "HTMLToken.h"
|
||||
|
||||
/**
|
||||
|
||||
@@ -63,7 +63,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
Initializes a new HTML element with the given tag name.
|
||||
|
||||
@param tagname The tag name.
|
||||
@param tagName The tag name.
|
||||
@return A new HTML element.
|
||||
*/
|
||||
- (instancetype)initWithTagName:(NSString *)tagName;
|
||||
@@ -71,7 +71,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
Initializes a new HTML element with the given tag name and attributes.
|
||||
|
||||
@param tagname The tag name.
|
||||
@param tagName The tag name.
|
||||
@param attributes The attributes.
|
||||
@return A new HTML element.
|
||||
*/
|
||||
@@ -80,8 +80,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
Initializes a new HTML element with the given tag name, namespace, and attributes.
|
||||
|
||||
@param tagname The tag name.
|
||||
@param namespace The namespace.
|
||||
@param tagName The tag name.
|
||||
@param htmlNamespace The HTML namespace.
|
||||
@param attributes The attributes.
|
||||
@return A new HTML element.
|
||||
*/
|
||||
@@ -107,7 +107,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
Set the value of the attribute with the given name.
|
||||
|
||||
@param value The value to set.
|
||||
@param name The attribute's name.
|
||||
@param attribute The attribute's name.
|
||||
*/
|
||||
- (void)setObject:(NSString *)value forKeyedSubscript:(NSString *)attribute;
|
||||
|
||||
|
||||
@@ -140,31 +140,3 @@ NS_INLINE void AdjustSVGNameCase(HTMLTagToken *token)
|
||||
NSString *replacement = replacements[token.tagName] ?: token.tagName;
|
||||
token.tagName = replacement;
|
||||
}
|
||||
|
||||
NS_INLINE void AdjustForeignAttributes(HTMLTagToken *token)
|
||||
{
|
||||
if (token.attributes == nil) {
|
||||
return;
|
||||
}
|
||||
|
||||
NSDictionary *replacements = @{ @"xlink:actuate": @"xlink actuate",
|
||||
@"xlink:arcrole": @"xlink arcrole",
|
||||
@"xlink:href": @"xlink href",
|
||||
@"xlink:role": @"xlink role",
|
||||
@"xlink:show": @"xlink show",
|
||||
@"xlink:title": @"xlink title",
|
||||
@"xlink:type": @"xlink type",
|
||||
@"xml:base": @"xml base",
|
||||
@"xml:lang": @"xml lang",
|
||||
@"xml:space": @"xml space",
|
||||
@"xmlns": @"xmlns",
|
||||
@"xmlns:xlink": @"xmlns xlink"};
|
||||
|
||||
HTMLOrderedDictionary *adjusted = [HTMLOrderedDictionary new];
|
||||
for (id key in token.attributes) {
|
||||
NSString *replacement = replacements[key] ?: key;
|
||||
adjusted[replacement] = token.attributes[key];
|
||||
}
|
||||
token.attributes = adjusted;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
/**
|
||||
Typedef for the error callback block.
|
||||
|
||||
@param reason The string describing the reason of the reported error.
|
||||
@param code The standarized error-code
|
||||
@param details The string describing the reason of the reported error.
|
||||
*/
|
||||
typedef void (^ HTMLStreamReaderErrorCallback)(NSString *code, NSString *details);
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ extern const unsigned char HTMLKitVersionString[];
|
||||
|
||||
#import "HTMLDOM.h"
|
||||
#import "HTMLParser.h"
|
||||
#import "HTMLSanitizer.h"
|
||||
|
||||
#import "HTMLKitErrorDomain.h"
|
||||
#import "HTMLOrderedDictionary.h"
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ typedef NS_OPTIONS(unsigned short, HTMLDocumentPosition)
|
||||
/**
|
||||
Returns the index of the given child element in the set of child nodes.
|
||||
|
||||
@param node The element.
|
||||
@param element The element.
|
||||
@return The index of the given element in the children set.
|
||||
*/
|
||||
- (NSUInteger)indexOfChildElement:(HTMLElement *)element;
|
||||
@@ -248,7 +248,7 @@ typedef NS_OPTIONS(unsigned short, HTMLDocumentPosition)
|
||||
/**
|
||||
Prepends the given array of nodes to the set of child nodes.
|
||||
|
||||
@param node The nodes to prepend.
|
||||
@param nodes The nodes to prepend.
|
||||
*/
|
||||
- (void)prependNodes:(NSArray<HTMLNode *> *)nodes;
|
||||
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
// Copyright (c) 2014 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
///------------------------------------------------------
|
||||
/// HTMLKit private header
|
||||
///------------------------------------------------------
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "HTMLToken.h"
|
||||
|
||||
|
||||
@@ -113,16 +113,16 @@ typedef NS_ENUM(unsigned short, HTMLRangeComparisonMethod)
|
||||
/**
|
||||
Sets the start boundary.
|
||||
|
||||
@param startNode The new node of the start boundary.
|
||||
@param startOffset The new offset of the start boundary.
|
||||
@param node The new node of the start boundary.
|
||||
@param offset The new offset of the start boundary.
|
||||
*/
|
||||
- (void)setStartNode:(HTMLNode *)node startOffset:(NSUInteger)offset;
|
||||
|
||||
/**
|
||||
Sets the end boundary.
|
||||
|
||||
@param startNode The new node of the end boundary.
|
||||
@param startOffset The new offset of the end boundary.
|
||||
@param node The new node of the end boundary.
|
||||
@param offset The new offset of the end boundary.
|
||||
*/
|
||||
- (void)setEndNode:(HTMLNode *)node endOffset:(NSUInteger)offset;
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
/**
|
||||
Checks whether an element with the given tag name is in the stack.
|
||||
|
||||
@param tagname The element's tag name.
|
||||
@param tagName The element's tag name.
|
||||
@return `YES` if such an element is in the stack, `NO` otherwise.
|
||||
*/
|
||||
- (BOOL)containsElementWithTagName:(NSString *)tagName;
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
// Copyright (c) 2014 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
///------------------------------------------------------
|
||||
/// HTMLKit private header
|
||||
///------------------------------------------------------
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "HTMLToken.h"
|
||||
#import "HTMLOrderedDictionary.h"
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
// Copyright (c) 2014 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
///------------------------------------------------------
|
||||
/// HTMLKit private header
|
||||
///------------------------------------------------------
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class HTMLDOCTYPEToken;
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
// Copyright (c) 2014 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
///------------------------------------------------------
|
||||
/// HTMLKit private header
|
||||
///------------------------------------------------------
|
||||
|
||||
#import "HTMLToken.h"
|
||||
#import "HTMLCharacterToken.h"
|
||||
#import "HTMLCommentToken.h"
|
||||
|
||||
@@ -49,7 +49,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
Initializes a new tree walker with no filter and HTMLNodeFilterShowAll show options.
|
||||
|
||||
@param node The root node.
|
||||
@param filter The node filter to use.
|
||||
@return A new instance of a tree walker.
|
||||
*/
|
||||
- (instancetype)initWithNode:(HTMLNode *)node;
|
||||
|
||||
@@ -48,6 +48,13 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
- (NSUInteger)leadingHTMLWhitespaceLength;
|
||||
|
||||
/**
|
||||
Escapes this string as specified in `https://html.spec.whatwg.org/multipage/parsing.html#escapingString`
|
||||
|
||||
@return A copy of this string by HTML-escaping this stirng.
|
||||
*/
|
||||
- (NSString *)stringByEscapingForHTML;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// CSSStructuralPseudoSelectors.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 18.04.18.
|
||||
// Copyright © 2018 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "CSSSelectors.h"
|
||||
#import "HTMLParser.h"
|
||||
#import "HTMLDOM.h"
|
||||
|
||||
@interface CSSStructuralPseudoSelectors : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation CSSStructuralPseudoSelectors
|
||||
|
||||
#pragma mark - Bug Fixes
|
||||
|
||||
- (void)testBugFix_Issue_25
|
||||
{
|
||||
NSString *html = @"<table><tr><td>TD #0</td><td>TD #1</td><td>TD #2</td><td>TD #3</td></tr></table>";
|
||||
HTMLDocument *doc = [HTMLDocument documentWithString:html];
|
||||
NSArray<HTMLElement *> *elements = [doc querySelectorAll:@"td:gt(0)"];
|
||||
|
||||
XCTAssertEqual(elements.count, 3);
|
||||
XCTAssertEqualObjects(elements[0].textContent, @"TD #1");
|
||||
XCTAssertEqualObjects(elements[1].textContent, @"TD #2");
|
||||
XCTAssertEqualObjects(elements[2].textContent, @"TD #3");
|
||||
|
||||
elements = [doc querySelectorAll:@"td:lt(0)"];
|
||||
XCTAssertEqual(elements.count, 0);
|
||||
|
||||
elements = [doc querySelectorAll:@"td:eq(0)"];
|
||||
XCTAssertEqual(elements.count, 1);
|
||||
XCTAssertEqualObjects(elements[0].textContent, @"TD #0");
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -9,6 +9,7 @@
|
||||
#import "HTML5LibTreeConstructionTest.h"
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import "HTMLDOM.h"
|
||||
#import "HTMLDocumentType.h"
|
||||
#import "HTMLElement.h"
|
||||
#import "HTMLText.h"
|
||||
@@ -289,6 +290,8 @@ NS_INLINE NSArray * parseAttribute(NSString *str)
|
||||
NSRange range = [str rangeOfString:@"=" options:0];
|
||||
|
||||
NSString *key = [str substringToIndex:range.location];
|
||||
key = [key stringByReplacingOccurrencesOfString:@" " withString:@":"];
|
||||
|
||||
NSString *value = [str substringFromIndex:range.location + 2];
|
||||
value = [value substringToIndex:value.length - 1];
|
||||
|
||||
|
||||
@@ -592,4 +592,35 @@ static HTMLNode * (^ LastDescendant)(HTMLNode *) = ^ HTMLNode * (HTMLNode *node)
|
||||
XCTAssertEqual(0, nodeIterators.count);
|
||||
}
|
||||
|
||||
- (void)testBugFix_Issue_22 {
|
||||
// The issue is applicable only for devices. On simulator the test is passed.
|
||||
HTMLDocument *document = [HTMLDocument documentWithString:@"<div id=\"id\"></div>"];
|
||||
|
||||
NSString *divId = @"id";
|
||||
HTMLNodeFilterBlock *filter = [HTMLNodeFilterBlock filterWithBlock:^HTMLNodeFilterValue(HTMLNode * _Nonnull node) {
|
||||
HTMLElement *element = (HTMLElement *)node;
|
||||
return [element.elementId isEqualToString:divId] ? HTMLNodeFilterAccept : HTMLNodeFilterSkip;
|
||||
}];
|
||||
|
||||
HTMLNodeIterator *iterator = [document nodeIteratorWithShowOptions:HTMLNodeFilterShowElement filter:filter];
|
||||
|
||||
HTMLElement *element = (HTMLElement*)iterator.nextObject;
|
||||
XCTAssertTrue([element.elementId isEqualToString:divId]);
|
||||
}
|
||||
|
||||
- (void)testBugFix_Issue_28 {
|
||||
HTMLDocument *document = self.document;
|
||||
HTMLNodeIterator *iterator = document.body.nodeIterator;
|
||||
|
||||
[iterator nextNode]; // Reference node: <body>
|
||||
|
||||
HTMLElement *span = (HTMLElement*)iterator.nextNode; // <span>
|
||||
NSString *spanTag = @"span";
|
||||
XCTAssertTrue([span.tagName isEqualToString:spanTag]);
|
||||
|
||||
HTMLElement *paragraph = span.nextSiblingElement; // <p>
|
||||
NSString *paragraphTag = @"p";
|
||||
XCTAssertTrue([paragraph.tagName isEqualToString:paragraphTag]);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -512,4 +512,60 @@
|
||||
XCTAssertTrue([image compareDocumentPositionWithNode:outerDiv] == (HTMLDocumentPositionContainedBy | HTMLDocumentPositionFollowing));
|
||||
}
|
||||
|
||||
- (void)testDeepCloneElement {
|
||||
HTMLElement *outer = [[HTMLElement alloc] initWithTagName:@"div"
|
||||
attributes:@{@"id": @"outer",
|
||||
@"class": @"green"}];
|
||||
|
||||
HTMLElement *innerLevel1 = [[HTMLElement alloc] initWithTagName:@"div"
|
||||
attributes:@{@"id": @"inner1",
|
||||
@"class": @"red"}];
|
||||
|
||||
HTMLElement *innerLevel2 = [[HTMLElement alloc] initWithTagName:@"div"
|
||||
attributes:@{@"id": @"inner2",
|
||||
@"class": @"red"}];
|
||||
|
||||
[outer appendNode:innerLevel1];
|
||||
[innerLevel1 appendNode:innerLevel2];
|
||||
|
||||
HTMLElement *clone = [outer cloneNodeDeep:YES];
|
||||
|
||||
XCTAssertNotEqual(clone, outer);
|
||||
XCTAssertEqualObjects(clone.elementId, outer.elementId);
|
||||
XCTAssertEqualObjects(clone.attributes, outer.attributes);
|
||||
|
||||
XCTAssertNotEqual(clone.firstChild, innerLevel1);
|
||||
XCTAssertEqualObjects(clone.firstChild.asElement.elementId, innerLevel1.elementId);
|
||||
XCTAssertEqualObjects(clone.firstChild.asElement.attributes, innerLevel1.attributes);
|
||||
|
||||
XCTAssertNotEqual(clone.firstChild, innerLevel2);
|
||||
XCTAssertEqualObjects(clone.firstChild.firstChild.asElement.elementId, innerLevel2.elementId);
|
||||
XCTAssertEqualObjects(clone.firstChild.firstChild.asElement.attributes, innerLevel2.attributes);
|
||||
}
|
||||
|
||||
- (void)testDeepCloneElementAttributes {
|
||||
HTMLElement *div = [[HTMLElement alloc] initWithTagName:@"div"
|
||||
attributes:@{@"id": @"outer",
|
||||
@"class": @"green",
|
||||
@"data": @"test"}];
|
||||
|
||||
HTMLElement *clone = [div cloneNodeDeep:YES];
|
||||
|
||||
XCTAssertEqualObjects(clone.attributes, div.attributes);
|
||||
XCTAssertTrue([clone.attributes isKindOfClass:[HTMLOrderedDictionary class]]);
|
||||
}
|
||||
|
||||
#pragma mark - Bug Fixes
|
||||
|
||||
- (void)testBugFix_Issue_20 {
|
||||
HTMLElement *element = [HTMLElement new];
|
||||
element.elementId = @"originalId";
|
||||
|
||||
HTMLElement *clone = [element cloneNodeDeep:YES];
|
||||
NSString *cloneId = @"cloneId";
|
||||
clone.elementId = cloneId;
|
||||
|
||||
XCTAssertTrue([clone.elementId isEqualToString:cloneId]);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// HTMLSerializationTests.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 06.11.17.
|
||||
// Copyright © 2017 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "HTMLDOM.h"
|
||||
|
||||
@interface HTMLSerializationTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation HTMLSerializationTests
|
||||
|
||||
- (void)setUp {
|
||||
[super setUp];
|
||||
}
|
||||
|
||||
- (void)tearDown {
|
||||
[super tearDown];
|
||||
}
|
||||
|
||||
#pragma mark - Bug Fixes
|
||||
|
||||
- (void)testBugFix_Issue_16
|
||||
{
|
||||
NSString *html = @"<body><div><test></div></body>";
|
||||
HTMLDocument *document = [HTMLDocument documentWithString:html];
|
||||
|
||||
XCTAssertEqualObjects(document.body.outerHTML, html);
|
||||
}
|
||||
|
||||
- (void)testBugFix_Issue_17
|
||||
{
|
||||
NSString *html = @"<body key='& testing 0x00A0'></body>";
|
||||
HTMLDocument *document = [HTMLDocument documentWithString:html];
|
||||
|
||||
XCTAssertEqualObjects(document.body.outerHTML, @"<body key=\"& testing \"></body>");
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "NSString+HTMLKit.h"
|
||||
#import "HTMLDOM.h"
|
||||
|
||||
@interface HTMLKitStringCategoryTests : XCTestCase
|
||||
|
||||
@@ -79,4 +80,20 @@
|
||||
XCTAssertEqual([@"\t\r\n\f\0 " leadingHTMLWhitespaceLength], 4);
|
||||
}
|
||||
|
||||
- (void)testStringByEscapingForHTML
|
||||
{
|
||||
XCTAssertEqualObjects(@"".stringByEscapingForHTML, @"");
|
||||
XCTAssertEqualObjects(@"&".stringByEscapingForHTML, @"&");
|
||||
XCTAssertEqualObjects(@"0x00A0".stringByEscapingForHTML, @" ");
|
||||
XCTAssertEqualObjects(@"\"".stringByEscapingForHTML, @""");
|
||||
XCTAssertEqualObjects(@"<".stringByEscapingForHTML, @"<");
|
||||
XCTAssertEqualObjects(@">".stringByEscapingForHTML, @">");
|
||||
XCTAssertEqualObjects(@"&0x00A0\"<>".stringByEscapingForHTML, @"& "<>");
|
||||
|
||||
NSString *input = @"This is an <b>email</b>: John Do <john@do.com>";
|
||||
NSString *escaped = input.stringByEscapingForHTML;
|
||||
XCTAssertNotEqual(input, escaped);
|
||||
XCTAssertEqualObjects(escaped, @"This is an <b>email</b>: John Do <john@do.com>");
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
+1
-1
Submodule Tests/html5lib-tests updated: cbafeba945...515dc09aaa
Reference in New Issue
Block a user