Changeset 89cbc196a3ce2bb0e54f16575a48d94703c1cc6e

Show
Ignore:
Timestamp:
20/06/08 10:02:37 (4 months ago)
Author:
Ilkka Ollakka <ileoo@videolan.org>
git-committer:
Ilkka Ollakka <ileoo@videolan.org> 1213948957 +0300
git-parent:

[c49d12129a0d9835d56a1879b02643b99515ab2c]

git-author:
Ilkka Ollakka <ileoo@videolan.org> 1213775804 +0300
Message:

add xml_encode to http-control rpn, so status/playlist.xml can be easier
be valid xml without str_replace-stuff.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/control/http/rpn.c

    r2709abb r89cbc19  
    371371            free( value ); 
    372372        } 
     373        else if( !strcmp( s, "xml_encode" ) ) 
     374        { 
     375            char *url = SSPop( st ); 
     376            char *value = convert_xml_special_chars( url ); 
     377            free( url ); 
     378            SSPush( st, value ); 
     379            free( value ); 
     380        } 
    373381        else if( !strcmp( s, "addslashes" ) ) 
    374382        { 
  • share/http/requests/playlist.xml

    r5026666 r89cbc19  
    3636  <vlc id="if" param1="pl.type value 'Node' strcmp" /> 
    3737    <vlc id="rpn" param1="1 +" /> 
    38     <leaf id="<vlc id="value" param1="pl.index" />" <vlc id="if" param1="pl.current" /> current="current" <vlc id="end" /> uri="<vlc id="value" param1="pl.uri value '&' '&amp;' str_replace" />" name="<vlc id="value" param1="pl.name value '&' '&amp;' str_replace" />" ro="<vlc id="value" param1="pl.ro" />" duration="<vlc id="value" param1="pl.duration" />" /> 
     38    <leaf id="<vlc id="value" param1="pl.index" />" <vlc id="if" param1="pl.current" /> current="current" <vlc id="end" /> uri="<vlc id="value" param1="pl.uri xml_encode" />" name="<vlc id="value" param1="pl.name xml_encode" />" ro="<vlc id="value" param1="pl.ro" />" duration="<vlc id="value" param1="pl.duration" />" /> 
    3939  <vlc id="else" /> 
    40     <node id="<vlc id="value" param1="pl.index" />" name="<vlc id="value" param1="pl.name value '&' '&amp;' str_replace" />" ro="<vlc id="value" param1="pl.ro" />" > 
     40    <node id="<vlc id="value" param1="pl.index" />" name="<vlc id="value" param1="pl.name xml_encode" />" ro="<vlc id="value" param1="pl.ro" />" > 
    4141    <vlc id="if" param1="first_item value 0 ="/> 
    4242      <vlc id="rpn" param1="first_item 1 store" /> 
  • share/http/requests/status.xml

    r5026666 r89cbc19  
    118118  <information> 
    119119    <vlc id="foreach" param1="inf" param2="information" /> 
    120       <category name="<vlc id="value" param1="inf.name" />"> 
     120      <category name="<vlc id="value" param1="inf.name xml_encode" />"> 
    121121        <vlc id="foreach" param1="subinf" param2="inf.info" /> 
    122           <info name="<vlc id="value" param1="subinf.name" />"><vlc id="value" param1="subinf.value" /></info> 
     122          <info name="<vlc id="value" param1="subinf.name xml_encode" />"><vlc id="value" param1="subinf.value xml_encode" /></info> 
    123123        <vlc id="end" /> 
    124124      </category>