Changeset d49819f39a81972d744a39a9eea42c63b5b455f4

Show
Ignore:
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
  • httpserver.py

    r214a148 rd49819f  
    55from Cheetah.Template import Template 
    66from plugin import GetPlugin 
     7from xml.sax.saxutils import escape 
    78 
    89SCRIPTDIR = os.path.dirname(__file__) 
     
    7475         t.containers = self.server.containers 
    7576         t.hostname = socket.gethostname() 
     77         t.escape = escape 
    7678         self.send_response(200) 
    7779         self.end_headers() 
  • templates/root_container.tmpl

    r6ddab42 rd49819f  
    55        <ContentType>x-container/tivo-server</ContentType> 
    66        <SourceFormat>x-container/folder</SourceFormat> 
    7         <TotalItems>1</TotalItems> 
     7        <TotalItems>#echo len($containers) #</TotalItems> 
    88    </Details> 
    99 
     
    1111    <Item> 
    1212        <Details> 
    13             <Title>$name</Title> 
    14             <ContentType>$details.content_type</ContentType> 
     13            <Title>$escape($name)</Title> 
     14            <ContentType>$escape($details.content_type)</ContentType> 
    1515            <SourceFormat>x-container/folder</SourceFormat> 
    1616        </Details> 
    1717        <Links> 
    1818            <Content> 
    19                 <Url>/TiVoConnect?Command=QueryContainer&amp;Container=$name</Url> 
    20                 <ContentType>$details.content_type</ContentType> 
     19                <Url>/TiVoConnect?Command=QueryContainer&amp;Container=$escape($name)</Url> 
     20                <ContentType>$escape($details.content_type)</ContentType> 
    2121            </Content> 
    2222        </Links>