Mercurial > addons > firefox-addons > feed-preview
annotate web_resources/feed-preview.xhtml @ 14:376a0e415bba
Properly handle non-text content in Atom feed elements
The title, subtitle, summary and content elements of Atom feeds can all have
non-text content. When parsing title and subtitle elements HTML and XHTML
content will be stripped of any markup in order to keep it simple. In summary
and content elements markup will be preserved. Element content of any other
type as well as remote content in content elements will be ignored.
author | Guido Berhoerster <guido+feed-preview@berhoerster.name> |
---|---|
date | Mon, 10 Dec 2018 16:38:11 +0100 |
parents | ff5e5e3eba32 |
children | f0c4a458869c |
rev | line source |
---|---|
6
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
1 <?xml version="1.0" encoding="UTF-8"?> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
2 <!DOCTYPE html> |
0
bc5cc170163c
Initial revision
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
diff
changeset
|
3 <html xmlns="http://www.w3.org/1999/xhtml"> |
bc5cc170163c
Initial revision
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
diff
changeset
|
4 <head> |
bc5cc170163c
Initial revision
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
diff
changeset
|
5 <meta charset="utf-8"/> |
bc5cc170163c
Initial revision
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
diff
changeset
|
6 <!-- |
bc5cc170163c
Initial revision
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
diff
changeset
|
7 Copyright (C) 2018 Guido Berhoerster <guido+feed-preview@berhoerster.name> |
bc5cc170163c
Initial revision
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
diff
changeset
|
8 |
bc5cc170163c
Initial revision
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
diff
changeset
|
9 This Source Code Form is subject to the terms of the Mozilla Public |
bc5cc170163c
Initial revision
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
diff
changeset
|
10 License, v. 2.0. If a copy of the MPL was not distributed with this |
bc5cc170163c
Initial revision
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
diff
changeset
|
11 file, You can obtain one at http://mozilla.org/MPL/2.0/. |
bc5cc170163c
Initial revision
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
diff
changeset
|
12 --> |
bc5cc170163c
Initial revision
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
diff
changeset
|
13 <meta name="viewport" content="width=device-width, initial-scale=1"/> |
10
ff5e5e3eba32
Implement feed subscription for web-based feed readers
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
9
diff
changeset
|
14 <link id="default-stylesheet" rel="stylesheet" href=""/> |
0
bc5cc170163c
Initial revision
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
diff
changeset
|
15 <title></title> |
bc5cc170163c
Initial revision
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
diff
changeset
|
16 </head> |
bc5cc170163c
Initial revision
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
diff
changeset
|
17 <body> |
6
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
18 <template id="feed-logo-template"> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
19 <img id="feed-logo" src="" alt=""/> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
20 </template> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
21 <template id="entry-template"> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
22 <article> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
23 <details class="entry"> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
24 <summary> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
25 <header class="entry-header"> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
26 <p class="entry-date"><time></time></p> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
27 </header> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
28 </summary> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
29 <iframe class="entry-content" srcdoc="" title="" sandbox="" |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
30 width="800" height="360"></iframe> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
31 </details> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
32 </article> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
33 </template> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
34 <template id="entry-title-template"> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
35 <h1 class="entry-title"></h1> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
36 </template> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
37 <template id="entry-title-linked-template"> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
38 <h1 class="entry-title"><a class="entry-link" href="" title=""></a></h1> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
39 </template> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
40 <template id="entry-files-list-template"> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
41 <footer class="entry-files"> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
42 <h2 class="entry-files-title"></h2> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
43 <ul class="entry-files-list"> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
44 </ul> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
45 </footer> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
46 </template> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
47 <template id="entry-file-template"> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
48 <li class="entry-file"><a class="entry-file-link" href="" title=""></a> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
49 <span class="entry-file-info"></span></li> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
50 </template> |
10
ff5e5e3eba32
Implement feed subscription for web-based feed readers
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
9
diff
changeset
|
51 <form id="feed-subscription"> |
ff5e5e3eba32
Implement feed subscription for web-based feed readers
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
9
diff
changeset
|
52 <fieldset name="main" disabled="disabled"> |
ff5e5e3eba32
Implement feed subscription for web-based feed readers
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
9
diff
changeset
|
53 <label for="feed-reader-selection"></label><select |
ff5e5e3eba32
Implement feed subscription for web-based feed readers
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
9
diff
changeset
|
54 name="feed-reader-selection" id="feed-reader-selection" |
ff5e5e3eba32
Implement feed subscription for web-based feed readers
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
9
diff
changeset
|
55 required="required"></select><button type="submit" |
ff5e5e3eba32
Implement feed subscription for web-based feed readers
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
9
diff
changeset
|
56 name="subscribe" id="subscribe"></button> |
ff5e5e3eba32
Implement feed subscription for web-based feed readers
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
9
diff
changeset
|
57 </fieldset> |
ff5e5e3eba32
Implement feed subscription for web-based feed readers
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
9
diff
changeset
|
58 </form> |
6
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
59 <header id="feed-header"> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
60 <h1 id="feed-title"></h1> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
61 <p id="feed-subtitle"></p> |
5d7c13e998e9
Create feed previews using a stream filter
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
1
diff
changeset
|
62 </header> |
9
fcd65cf3f634
Simplify the hint shown if there are no entries
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
6
diff
changeset
|
63 <p id="no-entries-hint"></p> |
0
bc5cc170163c
Initial revision
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
diff
changeset
|
64 </body> |
bc5cc170163c
Initial revision
Guido Berhoerster <guido+feed-preview@berhoerster.name>
parents:
diff
changeset
|
65 </html> |