request_rec *r;
Attr *attr;
char *attr_style = NULL;
+ char *attr_id = NULL;
jxhtml = GET_JXHTML(pdoc);
doc = jxhtml->doc;
attr = qs_get_next_attr(doc,attr)) {
char *name = qs_get_attr_name(doc,attr);
char *value = qs_get_attr_value(doc,attr);
- if (STRCASEEQ('n','N',"name",name)) {
- /*----------------------------------------------------------------------*/
- /* CHTML1.0 */
- /*----------------------------------------------------------------------*/
- W_L(" name=\"");
- W_V(chxj_jreserved_to_safe_tag(r, value, jxhtml->entryp));
- W_L("\"");
+ if (STRCASEEQ('i','I',"id",name)){
+ attr_id = chxj_jreserved_to_safe_tag(r, value, jxhtml->entryp);
+ }
+ else if (STRCASEEQ('n','N',"name",name)) {
+ attr_id = chxj_jreserved_to_safe_tag(r, value, jxhtml->entryp);
}
else if (STRCASEEQ('h','H',"href",name)) {
/*----------------------------------------------------------------------*/
attr_style = value;
}
}
+ if(attr_id){
+ W_L(" name=\"");
+ W_V(attr_id);
+ W_L("\"");
+ }
W_L(">");
if (IS_CSS_ON(jxhtml->entryp)) {
request_rec *r = doc->r;
Attr *attr;
char *attr_style = NULL;
+ char *attr_id = NULL;
W_L("<a");
/*--------------------------------------------------------------------------*/
attr = qs_get_next_attr(doc,attr)) {
char* name = qs_get_attr_name(doc,attr);
char* value = qs_get_attr_value(doc,attr);
- if (STRCASEEQ('n','N',"name",name) && value && *value) {
- W_L(" id=\"");
- W_V(value);
- W_L("\"");
+ if (STRCASEEQ('i','I',"id",name)){
+ attr_id = apr_pstrdup(doc->buf.pool, value);
+ }
+ else if (STRCASEEQ('n','N',"name",name)) {
+ attr_id = apr_pstrdup(doc->buf.pool, value);
}
else if (STRCASEEQ('h','H',"href", name) && value && *value) {
value = chxj_encoding_parameter(r, value, 1);
attr_style = value;
}
}
+ if(attr_id){
+ W_L(" id=\"");
+ W_V(attr_id);
+ W_L("\"");
+ }
W_L(">");
if (IS_CSS_ON(xhtml->entryp)) {