Changeset d49819f39a81972d744a39a9eea42c63b5b455f4
- Timestamp:
- 11/25/07 13:31:21
(1 year ago)
- Author:
- Jason Michalski <armooo@armooo.net>
- git-committer:
- Jason Michalski <armooo@armooo.net> 1196019081 -0600
- git-parent:
[bf6c2415801df7a955be0005a917a6e635d978ca]
- git-author:
- Jason Michalski <armooo@armooo.net> 1196019081 -0600
- Message:
Added xml escaping for share names
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r214a148 |
rd49819f |
|
| 5 | 5 | from Cheetah.Template import Template |
|---|
| 6 | 6 | from plugin import GetPlugin |
|---|
| | 7 | from xml.sax.saxutils import escape |
|---|
| 7 | 8 | |
|---|
| 8 | 9 | SCRIPTDIR = os.path.dirname(__file__) |
|---|
| … | … | |
| 74 | 75 | t.containers = self.server.containers |
|---|
| 75 | 76 | t.hostname = socket.gethostname() |
|---|
| | 77 | t.escape = escape |
|---|
| 76 | 78 | self.send_response(200) |
|---|
| 77 | 79 | self.end_headers() |
|---|
| r6ddab42 |
rd49819f |
|
| 5 | 5 | <ContentType>x-container/tivo-server</ContentType> |
|---|
| 6 | 6 | <SourceFormat>x-container/folder</SourceFormat> |
|---|
| 7 | | <TotalItems>1</TotalItems> |
|---|
| | 7 | <TotalItems>#echo len($containers) #</TotalItems> |
|---|
| 8 | 8 | </Details> |
|---|
| 9 | 9 | |
|---|
| … | … | |
| 11 | 11 | <Item> |
|---|
| 12 | 12 | <Details> |
|---|
| 13 | | <Title>$name</Title> |
|---|
| 14 | | <ContentType>$details.content_type</ContentType> |
|---|
| | 13 | <Title>$escape($name)</Title> |
|---|
| | 14 | <ContentType>$escape($details.content_type)</ContentType> |
|---|
| 15 | 15 | <SourceFormat>x-container/folder</SourceFormat> |
|---|
| 16 | 16 | </Details> |
|---|
| 17 | 17 | <Links> |
|---|
| 18 | 18 | <Content> |
|---|
| 19 | | <Url>/TiVoConnect?Command=QueryContainer&Container=$name</Url> |
|---|
| 20 | | <ContentType>$details.content_type</ContentType> |
|---|
| | 19 | <Url>/TiVoConnect?Command=QueryContainer&Container=$escape($name)</Url> |
|---|
| | 20 | <ContentType>$escape($details.content_type)</ContentType> |
|---|
| 21 | 21 | </Content> |
|---|
| 22 | 22 | </Links> |
|---|