Branch: Tag:

2000-08-25

2000-08-25 00:21:06 by Martin Nilsson <mani@lysator.liu.se>

Move out attributes that belongs to the anchor tag to the anchor tag.

Rev: server/modules/graphics/graphic_text.pike:1.233

1:   // This is a roxen module. Copyright © 1996 - 2000, Roxen IS.   //    - constant cvs_version="$Id: graphic_text.pike,v 1.232 2000/08/21 01:04:55 nilsson Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.233 2000/08/25 00:21:06 nilsson Exp $";      #include <module.h>   inherit "module";
843:    string ext="";    if(query("ext")) ext="."+(p->format || "gif");    -  string lp="%s", url="", ea=""; +  string lp="%s", url="", ea=" ";       int input=0;    if(arg->submit)
860:    m_delete(arg, "href");    }    +  foreach( ({ "class", "onClick", "onclick", "onMouseover", "onmouseover", +  "onMouseout", "onmouseout" }), string name) +  if(arg[name]) { +  ea+=name+"="; +  if(!has_value(arg[name], "\"")) ea+="\""+arg[name]+"\" "; +  else if(!has_value(arg[name], "'")) ea+="'"+arg[name]+"' "; +  else ea+="\""+replace(arg[name], "'", "&#39;")+"\" "; +  m_delete(arg, name); +  } +     int xml=!arg->noxml;    m_delete(arg, "noxml"); -  +     if(!arg->border) arg->border="0";       if(arg->split)
926:    string sn="i"+id->misc->gtext_mi++;    if(!id->supports->js_image_object) {    return (!input)? -  ("<a "+ea+"href=\""+url+"\">"+Roxen.make_tag("img",arg+(["name":sn]),xml)+"</a>"): +  ("<a"+ea+"href=\""+url+"\">"+Roxen.make_tag("img",arg+(["name":sn]),xml)+"</a>"):    Roxen.make_tag("input",arg+(["type":"image"]),xml);    }   
947:    " "+sn+"l = new Image("+arg->width+", "+arg->height+");"+sn+"l.src = \""+arg->src+"\";\n"    " "+sn+"h = new Image("+arg->width+", "+arg->height+");"+sn+"h.src = \""+query_internal_location()+num2+ext+"\";\n"    "</script>\n"+ -  "<a "+ea+"href=\""+url+"\" "+ +  "<a"+ea+"href=\""+url+"\" "+    (input?"onClick='document.forms[0].submit();' ":"")    +"onMouseover=\"i('"+sn+"',"+sn+"h,"+((strlen(magic) && magic != "magic")?    "'"+replace(magic,"'","`")+"'":