Closed Bug 281258 Opened 20 years ago Closed 16 years ago

Clearing sidebar by javascript function window.sidebar.addPanel()

Categories

(Core Graveyard :: RDF, defect)

x86
Windows XP
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: org.mozilla.bugzilla-NO-PRIVATE-MAIL, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.7.5) Gecko/20041217
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.7.5) Gecko/20041217

The sidebar may be cleaned, when I add panel, which contains specific chars in
name or in URL. One of the specific char is \26.
The same situation can be achieved when I add a panel with config address (see
ex. 2).
This modification will be visible after restarting the browser. The default
panels will be mostly restored after the next restart of the browser (for
example bookmarks). I don't know how I did it, that sidebar was not restored
after restart of the browser (see Additional Information: Unrestorable files
PANELS.RDF)

Reproducible: Always

Steps to Reproduce:
see Additional Information: examples
Actual Results:  
The sidebar was cleaned. All the items of the sidebar are unrecoverable lost,
only the default items are back after the second restart of the browser.
Note: When I add a string containing "\26" into the first argument (label), the
dialog window doesn't display "\26".


example 1:
javascript:window.sidebar.addPanel ("ff\26ggggggg","http://xxx.com", "")

example 2:

javascript:window.sidebar.addPanel
("ffggggggg","http://\"/>chrome://navigator/content/navigator.xul\"/>\n 
</RDF:Seq>\n  

<RDF:Description RDF:about=\n\"urn:sidebar:panel:whats-related\"\n             
     NC:title=\"xSouvisející stránky\"        

           NC:content=\"chrome://navigator/content/navigator.xul" ,"dd")

Unrestorable files PANELS.RDF

<?xml version="1.0"?>
<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
         xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <RDF:Description RDF:about="urn:sidebar:current-panel-list"
                   NC:version="0.1">
    <NC:panel-list RDF:resource="rdf:#$lsT0o"/>
  </RDF:Description>
  <RDF:Description 

RDF:about="urn:sidebar:3rdparty-panel:http://&quot;/&gt;chrome://navigator/content/navigator.xul&quot;/&gt;
  &lt;/RDF:Seq&gt;
  &lt;RDF:Description RDF:about=
&quot;urn:sidebar:panel:whats-related&quot;
                   NC:title=&quot;xSouvisej­c­ strÇnky&quot;                   

NC:content=&quot;chrome://navigator/content/navigator.xul"
                   NC:title="ffggggggg"
                   NC:customize="dd"
                   NC:persist="false">
    <NC:content>http://"/&gt;chrome://navigator/content/navigator.xul"/&gt;
  &lt;/RDF:Seq&gt;
  &lt;RDF:Description RDF:about=
"urn:sidebar:panel:whats-related"
                   NC:title="xSouvisej­c­ strÇnky"                   

NC:content="chrome://navigator/content/navigator.xul</NC:content>
  </RDF:Description>
  <RDF:Description RDF:about="urn:sidebar:panel:whats-related"
                   NC:title="Související stránky"
                  
NC:content="chrome://communicator/content/related/related-panel.xul" />
  <RDF:Description RDF:about="urn:sidebar:panel:bookmarks"
                   NC:title="Záložky"
                  
NC:content="chrome://communicator/content/bookmarks/bm-panel.xul" />
  <RDF:Description RDF:about="urn:sidebar:panel:search"
                   NC:title="Hledání"
                  
NC:content="chrome://communicator/content/search/search-panel.xul" />
  <RDF:Seq RDF:about="rdf:#$lsT0o">
    <RDF:li RDF:resource="urn:sidebar:panel:whats-related"/>
    <RDF:li RDF:resource="urn:sidebar:panel:search"/>
    <RDF:li RDF:resource="urn:sidebar:panel:bookmarks"/>
    <RDF:li RDF:resource="urn:sidebar:panel:history"/>
    <RDF:li
RDF:resource="urn:sidebar:3rdparty-panel:http://&quot;/&gt;chrome://navigator/content/navigator.xul&quot;/&gt;
  &lt;/RDF:Seq&gt;
  &lt;RDF:Description RDF:about=
&quot;urn:sidebar:panel:whats-related&quot;
                   NC:title=&quot;xSouvisej­c­ strÇnky&quot;                   

NC:content=&quot;chrome://navigator/content/navigator.xul"/>
  </RDF:Seq>
  <RDF:Description RDF:about="urn:sidebar:panel:history"
                   NC:title="Historie"
                  
NC:content="chrome://communicator/content/history/history-panel.xul" />
</RDF:RDF>



or
<?xml version="1.0"?>
<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
         xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <RDF:Description RDF:about="urn:sidebar:panel:history"
                   NC:title="Historie"
                  
NC:content="chrome://communicator/content/history/history-panel.xul" />
  <RDF:Description RDF:about="urn:sidebar:panel:search"
                   NC:title="Hledání"
                  
NC:content="chrome://communicator/content/search/search-panel.xul" />
  <RDF:Description RDF:about="urn:sidebar:current-panel-list"
                   NC:version="0.1">
    <NC:panel-list RDF:resource="rdf:#$Z+CWw3"/>
  </RDF:Description>
  <RDF:Description 

RDF:about="urn:sidebar:3rdparty-panel:http://&quot;/&gt;chrome://navigator/content/navigator.xul&quot;/&gt;
  &lt;/RDF:Seq&gt;
  &lt;RDF:Description RDF:about=
&quot;urn:sidebar:panel:whats-related&quot;
                   NC:title=&quot;xSouvisej­c­ strÇnky&quot;                   

NC:content=&quot;chrome://navigator/content/navigator.xul"
                   NC:title="ffggggggg"
                   NC:customize="dd"
                   NC:persist="false">
    <NC:content>http://"/&gt;chrome://navigator/content/navigator.xul"/&gt;
  &lt;/RDF:Seq&gt;
  &lt;RDF:Description RDF:about=
"urn:sidebar:panel:whats-related"
                   NC:title="xSouvisej­c­ strÇnky"                   

NC:content="chrome://navigator/content/navigator.xul</NC:content>
  </RDF:Description>
  <RDF:Seq RDF:about="rdf:#$Z+CWw3">
    <RDF:li RDF:resource="urn:sidebar:panel:whats-related"/>
    <RDF:li RDF:resource="urn:sidebar:panel:search"/>
    <RDF:li RDF:resource="urn:sidebar:panel:bookmarks"/>
    <RDF:li RDF:resource="urn:sidebar:panel:history"/>
    <RDF:li
RDF:resource="urn:sidebar:3rdparty-panel:http://&quot;/&gt;chrome://navigator/content/navigator.xul&quot;/&gt;
  &lt;/RDF:Seq&gt;
  &lt;RDF:Description RDF:about=
&quot;urn:sidebar:panel:whats-related&quot;
                   NC:title=&quot;xSouvisej­c­ strÇnky&quot;                   

NC:content=&quot;chrome://navigator/content/navigator.xul"/>
  </RDF:Seq>
  <RDF:Description RDF:about="urn:sidebar:panel:whats-related"
                   NC:title="Související stránky"
                  
NC:content="chrome://communicator/content/related/related-panel.xul" />
  <RDF:Description RDF:about="urn:sidebar:panel:bookmarks"
                   NC:title="Záložky"
                  
NC:content="chrome://communicator/content/bookmarks/bm-panel.xul" />
</RDF:RDF>
The non-ascii aspect could be because the sidebar is using GetResource instead
of GetUnicodeResource, but there could also exist an RDF serialization bug...
Assignee: sidebar → nobody
Component: Sidebar → RDF
Product: Mozilla Application Suite → Core
QA Contact: rdf
Version: unspecified → Trunk
Is this bug still showing up on the trunk?
no response
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INCOMPLETE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.