/*
- * Copyright (C) 2005-2009 Atsushi Konno All rights reserved.
+ * Copyright (C) 2005-2011 Atsushi Konno All rights reserved.
* Copyright (C) 2005 QSDN,Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
static void s_init_chtml50(chtml50_t *chtml, Doc *doc, request_rec *r, device_table *spec);
-static int s_chtml50_search_emoji(chtml50_t *chtml, char *txt, char **rslt);
+static int s_chtml50_search_emoji(chtml50_t *chtml, char *txt, char **rslt, Node *node);
static css_prop_list_t *s_chtml50_push_and_get_now_style(void *pdoc, Node *node, const char *style_attr_value);
static css_prop_list_t *s_chtml50_nopush_and_get_now_style(void *pdoc, Node *node, const char *style_attr_value);
s_chtml50_chxjif_tag,
NULL,
},
+ /* tagCHXJRAW */
+ {
+ s_chtml50_chxjif_tag,
+ NULL,
+ },
/* tagNOBR */
{
NULL,
s_chtml50_newline_mark,
NULL,
},
+ /* tagObject */
+ {
+ NULL,
+ NULL,
+ },
+ /* tagParam */
+ {
+ NULL,
+ NULL,
+ },
+ /* tagCAPTION */
+ {
+ NULL,
+ NULL,
+ },
};
* EMOJI is specified.
* @param rslt [o] The pointer to the pointer that stores the result is
* specified.
+ * @param node [i] The current node to check whether tag is span/font for CHXJ_IMODE_EMOJI_COLOR_AUTO.
* @return When corresponding EMOJI exists, it returns it excluding 0.
*/
static int
-s_chtml50_search_emoji(chtml50_t *chtml50, char *txt, char **rslt)
+s_chtml50_search_emoji(chtml50_t *chtml50, char *txt, char **rslt, Node *node)
{
emoji_t *ee;
request_rec *r;
(*rslt)[0] = ee->imode->hex1byte & 0xff;
(*rslt)[1] = ee->imode->hex2byte & 0xff;
(*rslt)[2] = 0;
+
+ if(chtml50->conf->imode_emoji_color >= CHXJ_IMODE_EMOJI_COLOR_AUTO ){
+ if(ee->imode->color != NULL){
+ if(chtml50->conf->imode_emoji_color == CHXJ_IMODE_EMOJI_COLOR_AUTO && node != NULL ){
+ if(strcasecmp(node->parent->name, "span") == 0 ||
+ strcasecmp(node->parent->name, "font") == 0 ){
+ return strlen(ee->imode->string);
+ }
+ }
+ char *tmp = apr_pstrdup(r->pool,*rslt);
+ *rslt = apr_psprintf(r->pool,
+ "<font color=\"%s\">%s</font>",ee->imode->color,tmp);
+ }
+ }
return strlen(ee->imode->string);
}
char *out;
int rtn;
- rtn = s_chtml50_search_emoji(chtml50, (char *)&src[ii], &out);
+ rtn = s_chtml50_search_emoji(chtml50, (char *)&src[ii], &out, NULL);
if (rtn) {
W_V(out);
ii+=(rtn - 1);
W_V(attr_vlink);
W_L("\"");
}
-
- W_L("<body");
- if (attr_bgcolor) {
- attr_bgcolor = chxj_css_rgb_func_to_value(doc->pool, attr_bgcolor);
- W_L(" bgcolor=\"");
- W_V(attr_bgcolor);
- W_L("\"");
- }
- if (attr_text) {
- attr_text = chxj_css_rgb_func_to_value(doc->pool, attr_text);
- W_L(" text=\"");
- W_V(attr_text);
- W_L("\"");
- }
- if (attr_link) {
- attr_link = chxj_css_rgb_func_to_value(doc->pool, attr_link);
- W_L(" link=\"");
- W_V(attr_link);
- W_L("\"");
- }
- if (attr_alink) {
- attr_alink = chxj_css_rgb_func_to_value(doc->pool, attr_alink);
- W_L(" alink=\"");
- W_V(attr_alink);
- W_L("\"");
- }
- if (attr_vlink) {
- attr_vlink = chxj_css_rgb_func_to_value(doc->pool, attr_vlink);
- W_L(" vlink=\"");
- W_V(attr_vlink);
- W_L("\"");
- }
W_L(">");
return chtml50->out;
value = chxj_encoding_parameter(r, value, 0);
value = chxj_add_cookie_parameter(r, value, chtml50->cookie);
value = chxj_add_cookie_no_update_parameter(r, value);
+ value = chxj_img_rewrite_parameter(r,chtml50->conf,value);
attr_src = value;
#else
value = chxj_img_conv(r,spec,value);
value = chxj_encoding_parameter(r, value, 0);
value = chxj_add_cookie_parameter(r, value, chtml50->cookie);
value = chxj_add_cookie_no_update_parameter(r, value);
+ value = chxj_img_rewrite_parameter(r,chtml50->conf,value);
attr_src = value;
#endif
}
W_V(attr_start);
W_L("\"");
}
- W_L("<ol");
- if (attr_type) {
- W_L(" type=\"");
- W_V(attr_type);
- W_L("\"");
- }
- if (attr_start) {
- W_L(" start=\"");
- W_V(attr_start);
- W_L("\"");
- }
W_L(">");
return chtml50->out;
W_V(attr_align);
W_L("\"");
}
- W_L("<h3");
- if (attr_align) {
- W_L(" align=\"");
- W_V(attr_align);
- W_L("\"");
- }
W_L(">");
return chtml50->out;
W_V(attr_align);
W_L("\"");
}
- W_L("<h5");
- if (attr_align) {
- W_L(" align=\"");
- W_V(attr_align);
- W_L("\"");
- }
W_L(">");
return chtml50->out;
for (ii=0; ii<qs_get_node_size(doc,child); ii++) {
char* out;
- int rtn = s_chtml50_search_emoji(chtml50, &textval[ii], &out);
+ int rtn = s_chtml50_search_emoji(chtml50, &textval[ii], &out, child);
if (rtn) {
tdst = qs_out_apr_pstrcat(r, tdst, out, &tdst_len);
ii+=(rtn - 1);
W_V(attr_type);
W_L("\"");
}
- W_L("<menu");
- if (attr_type) {
- W_L(" type=\"");
- W_V(attr_type);
- W_L("\"");
- }
W_L(">");
chtml50_flags_t *flg = (chtml50_flags_t *)apr_palloc(doc->pool, sizeof(chtml50_flags_t));
memset(flg, 0, sizeof(*flg));