[datatype-dev] CR:Change to escape '&' character in asx file
Eric Hyche ehyche at real.comCurrently (before your proposed change) if we had the following: <asx> <element& attribute&="value&">content&</foo&> </asx> then only "value&" would get escaped. I believe that after your proposed change, all instances of "& would get escaped except "element&". I don't think that's what we want. Ampersands in the content are kind of expected and forgiveable - we should not fail on that. And we can reasonably expect that there will be ampersands in URLs. However, for anything else, we should not escape it and just let it fail XML parsing. So my suggestion is that we add code so that "content&" gets escaped (and leave the existing code intact which escapes "value&"). Eric ======================================= Eric Hyche (ehyche at real.com) Principal Engineer RealNetworks, Inc. >-----Original Message----- >From: Varun Kathuria [mailto:vkathuria at real.com] >Sent: Wednesday, December 31, 2003 1:52 PM >To: ehyche at real.com; datatype-dev at helixcommunity.org >Subject: Re: [datatype-dev] CR:Change to escape '&' character in asx file > >Hi Eric, >Earlier only if we get '&', inside URL then it is replaced by '%26' i.e >ASCII value of '&' and after my change if we get anywhere '&' inside ><foo>XXXX</foo> >Then i am also doing the same thing. This is done inside PreProcessASX. Is >this the right way? > >Please suggest your approach. I am still unclear about your approach. > >Thanks >Varun Kathuria > > >----- Original Message ----- >From: "Eric Hyche" <ehyche at real.com> >To: "'Varun Kathuria'" <vkathuria at real.com>; ><datatype-dev at helixcommunity.org> >Sent: Wednesday, December 17, 2008 9:23 PM >Subject: RE: [datatype-dev] CR:Change to escape '&' character in asx file > > >>I think we should add code in the PreProcessASX function >> to see if we are inside element content, as in: >> >> <foo>XXXX</foo> >> >> Then if we see unescaped characters inside of XXXX, then >> we escape them, just as we do for attribute values. >> >> Eric >> >> ======================================= >> Eric Hyche (ehyche at real.com) >> Principal Engineer >> RealNetworks, Inc. >> >> >>>-----Original Message----- >>>From: Varun Kathuria [mailto:vkathuria at real.com] >>>Sent: Monday, December 15, 2008 11:34 PM >>>To: ehyche at real.com; datatype-dev at helixcommunity.org >>>Subject: Re: [datatype-dev] CR:Change to escape '&' character in asx file >>> >>>Hi Eric, >>> >>>In asx file we are receiving title as: >>><Title>The Beat (HipHop/R&B)</title> >>>So because of this '&' character we are receiving >>>"HXR_XML_INVALID_CHAR_REF" >>>error. >>> >>>Thanks >>>Varun Kathuria >>> >>>----- Original Message ----- >>>From: "Eric Hyche" <ehyche at real.com> >>>To: "'Varun Kathuria'" <vkathuria at real.com>; >>><datatype-dev at helixcommunity.org> >>>Sent: Tuesday, December 16, 2008 2:11 AM >>>Subject: RE: [datatype-dev] CR:Change to escape '&' character in asx file >>> >>> >>>> In what ASX fields are we seeing the '&' character besides URLs? >>>> >>>> Eric >>>> >>>> ======================================= >>>> Eric Hyche (ehyche at real.com) >>>> Principal Engineer >>>> RealNetworks, Inc. >>>> >>>> >>>>>-----Original Message----- >>>>>From: datatype-dev-bounces at helixcommunity.org >>>>>[mailto:datatype-dev-bounces at helixcommunity.org] On >>>>>Behalf Of Varun Kathuria >>>>>Sent: Friday, December 12, 2008 6:07 AM >>>>>To: datatype-dev at helixcommunity.org >>>>>Subject: [datatype-dev] CR:Change to escape '&' character in asx file >>>>> >>>>> >>>>>Synopsis: >>>>>Change to escape '&' character in asx file >>>>> >>>>>Overview: >>>>> >>>>>In the Current implementation of asx, '&' character is escaped only >>>>>inside >>>>>URL but if we encounter '&' >>>>>character anywhere else it is not escaped. And when we try to play that >>>>>asx file, then we get >>>>>"HXR_XML_INVALID_CHAR_REF" error. Its a change to escape '&' character >>>>>at >>>>>all places in asx file >>>>>whereever it is encountered. >>>>> >>>>>Files Added: >>>>>None >>>>> >>>>>Files Removed >>>>>None >>>>> >>>>>Files Modified: >>>>>/cvsroot/datatype/wm/asx/renderer/asxrender.cpp >>>>> >>>>>Image Size and Heap Use impact (Client -Only): >>>>>None. >>>>> >>>>>Platforms and Profiles Affected: >>>>>None >>>>> >>>>>Distribution Libraries Affected: >>>>>None >>>>> >>>>>Distribution library impact and planned action: >>>>>None >>>>> >>>>>Platforms and Profiles Build Verified: >>>>>BIF branch -> hxclient_3_1_0_atlas_restricted >>>>>Target(s) -> splay >>>>>Profile -> helix-client-all-defines >>>>>SYSTEM_ID -> win32-i386-vc7 >>>>> >>>>>Branch: >>>>>HEAD, ATLAS310 >>>>> >>>>>Files Attached: >>>>>diff_asx.txt >>>>> >>>>>Thanks & Regards >>>>>Varun Kathuria >>>>> >>>>> >>>> >>