Commit 9455e2b
authored
Atom: use correct xml:base for decoded elements (#222)
* Atom: use correct xml:base for decoded elements
In order to keep tracking xml:base correctly, the goxpp's
`DecodeElement` pops the BaseStack if the start element added a base (if
any).
That means the atom parser needs keep track of the base *before* calling
`DecodeElement` to use for resolving relative URLs within the decoded
element.
Without this fix, elements with xml:base attributes will be erroneously
resolved with the parent xml:base.
* Depend on updated goxpp version without xml:base bug
* Resolve xml:base URLs without switching out the BaseStack
This provides an equivalent fix that doesn't do any inelegant swapping
out of the BaseStack. It also doesn't change `goxpp`'s public API by
essentially copying `XmlBaseResolveUrl` to `gofeed`.1 parent 8340fbd commit 9455e2b
4 files changed
+34
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
| 661 | + | |
| 662 | + | |
661 | 663 | | |
662 | 664 | | |
663 | 665 | | |
| |||
672 | 674 | | |
673 | 675 | | |
674 | 676 | | |
675 | | - | |
| 677 | + | |
676 | 678 | | |
677 | 679 | | |
678 | 680 | | |
| |||
683 | 685 | | |
684 | 686 | | |
685 | 687 | | |
686 | | - | |
| 688 | + | |
687 | 689 | | |
688 | 690 | | |
689 | 691 | | |
690 | 692 | | |
691 | | - | |
| 693 | + | |
692 | 694 | | |
693 | 695 | | |
694 | 696 | | |
| |||
701 | 703 | | |
702 | 704 | | |
703 | 705 | | |
704 | | - | |
| 706 | + | |
705 | 707 | | |
706 | 708 | | |
707 | 709 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
86 | | - | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
98 | 119 | | |
99 | 120 | | |
100 | 121 | | |
101 | | - | |
102 | | - | |
| 122 | + | |
| 123 | + | |
103 | 124 | | |
104 | 125 | | |
105 | 126 | | |
| |||
117 | 138 | | |
118 | 139 | | |
119 | 140 | | |
120 | | - | |
| 141 | + | |
121 | 142 | | |
122 | 143 | | |
123 | 144 | | |
| |||
0 commit comments