rem: var htmlEditor = gEditor.QueryInterface(Components.interfaces.nsIHTMLEditor); if (htmlEditor.getElementOrParentByTagName("href", element)) objStr = GetString("ImageAndLink"); else 
add: try { if (gEditor.getElementOrParentByTagName("href", element)) objStr = GetString("ImageAndLink"); } catch(e) {}  if (objStr == "") 
context: function InitObjectPropertiesMenuitem(id){  // Set strings and enable for the [Object] Properties item  // Note that we directly do the enabling instead of  //  using goSetCommandEnabled since we already have the menuitem  var menuItem = document.getElementById(id);  if (!menuItem) return null;  var element;  var menuStr = GetString("AdvancedProperties");  var name;  if (IsEditingRenderedHTML())    element = GetObjectForProperties();  if (element && element.nodeName)  {    var objStr = "";    menuItem.setAttribute("disabled", "");    name = element.nodeName.toLowerCase();    switch (name)    {      case "img":        // Check if img is enclosed in link        //  (use "href" to not be fooled by named anchor)        var htmlEditor = gEditor.QueryInterface(Components.interfaces.nsIHTMLEditor);        if (htmlEditor.getElementOrParentByTagName("href", element))          objStr = GetString("ImageAndLink");        else          objStr = GetString("Image");        break;      case "hr":        objStr = GetString("HLine");        break;      case "table":        objStr = GetString("Table");        break;      case "th":        name = "td";      case "td":        objStr = GetString("TableCell");        break;      case "ol":      case "ul":      case "dl":        objStr = GetString("List");        break;      case "li":        objStr = GetString("ListItem");        break;      case "form":        objStr = GetString("Form");        break;      case "input":        var type = element.getAttribute("type");        if (type && type.toLowerCase() == "image")          objStr = GetString("InputImage");        else          objStr = GetString("InputTag");        break;      case "textarea":        objStr = GetString("TextArea");        break;      case "select":        objStr = GetString("Select");        break;      case "button":        objStr = GetString("Button");        break;      case "label":        objStr = GetString("Label");        break;      case "fieldset":        objStr = GetString("FieldSet");        break;      case "a":        if (element.name)        {          objStr = GetString("NamedAnchor");          name = "anchor";        }        else if(element.href)        {          objStr = GetString("Link");          name = "href";        }        break;    }    if (objStr)      menuStr = GetString("ObjectProperties").replace(/%obj%/,objStr);  }  else  {    // We show generic "Properties" string, but disable menu item    menuItem.setAttribute("disabled","true");  }  menuItem.setAttribute("label", menuStr);  menuItem.setAttribute("accesskey",GetString("ObjectPropertiesAccessKey"));  return name;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/160100a09b4b930d5b308fda04a1e21843697414/editor.js/buggy/editor/ui/composer/content/editor.js