static char* s_jhtml_end_option_tag (jhtml_t* jhtml, Node* node);
static char* s_jhtml_start_div_tag (jhtml_t* jhtml, Node* node);
static char* s_jhtml_end_div_tag (jhtml_t* jhtml, Node* node);
+static char* s_jhtml_start_textarea_tag(jhtml_t* jhtml, Node* child);
+static char* s_jhtml_end_textarea_tag(jhtml_t* jhtml, Node* child);
static void s_init_jhtml(jhtml_t* jhtml, Doc* doc, request_rec* r, device_table* spec);
static int s_jhtml_search_emoji(jhtml_t* jhtml, char* txt, char** rslt);
static char* chxj_istyle_to_mode(request_rec* r, const char* s);
char* name = qs_get_node_name(doc,child);
/*------------------------------------------------------------------------*/
+ /* <TEXTAREA> (for TEST) */
+ /*------------------------------------------------------------------------*/
+ if ((*name == 't' || *name == 'T') && strcasecmp(name, "textarea") == 0) {
+ s_jhtml_start_textarea_tag (jhtml, child);
+ s_jhtml_node_exchange (jhtml, child, indent+1);
+ s_jhtml_end_textarea_tag (jhtml, child);
+ }
+ else
+ /*------------------------------------------------------------------------*/
/* <PRE> (for TEST) */
/*------------------------------------------------------------------------*/
if ((*name == 'p' || *name == 'P') && strcasecmp(name, "pre") == 0) {
one_byte[0] = textval[ii+0];
tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
}
+ else
+ if (jhtml->textarea_flag) {
+ one_byte[0] = textval[ii+0];
+ tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
+ }
else {
if (textval[ii] != '\r' && textval[ii] != '\n') {
one_byte[0] = textval[ii+0];
s_jhtml_chxjif_tag(jhtml, child);
}
}
+
+/**
+ * It is a handler who processes the TEXTARE tag.
+ *
+ * @param jhtml [i/o] The pointer to the CHTML structure at the output
+ * destination is specified.
+ * @param node [i] The TEXTAREA tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char*
+s_jhtml_start_textarea_tag(jhtml_t* jhtml, Node* node)
+{
+ Doc* doc = jhtml->doc;
+ request_rec* r = doc->r;
+ Attr* attr;
+
+ jhtml->textarea_flag++;
+ jhtml->out = apr_pstrcat(r->pool, jhtml->out, "<textarea ", NULL);
+
+ for (attr = qs_get_attr(doc,node);
+ attr;
+ attr = qs_get_next_attr(doc,attr)) {
+
+ char* name = qs_get_attr_name(doc,attr);
+ char* value = qs_get_attr_value(doc,attr);
+
+ if ((*name == 'n' || *name == 'N') && strcasecmp(name, "name") == 0) {
+ jhtml->out = apr_pstrcat(r->pool, jhtml->out, " name=\"",value,"\"", NULL);
+ }
+ else
+ if ((*name == 'r' || *name == 'R') && strcasecmp(name, "rows") == 0) {
+ jhtml->out = apr_pstrcat(r->pool, jhtml->out, " rows=\"",value,"\"", NULL);
+ }
+ else
+ if ((*name == 'c' || *name == 'C') && strcasecmp(name, "cols") == 0) {
+ jhtml->out = apr_pstrcat(r->pool, jhtml->out, " cols=\"",value,"\"", NULL);
+ }
+ }
+
+ jhtml->out = apr_pstrcat(r->pool, jhtml->out, ">\r\n", NULL);
+
+ return jhtml->out;
+}
+
+/**
+ * It is a handler who processes the TEXTAREA tag.
+ *
+ * @param jhtml [i/o] The pointer to the CHTML structure at the output
+ * destination is specified.
+ * @param node [i] The TEXTAREA tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char*
+s_jhtml_end_textarea_tag(jhtml_t* jhtml, Node* child)
+{
+ Doc* doc = jhtml->doc;
+ request_rec* r = doc->r;
+
+ jhtml->out = apr_pstrcat(r->pool, jhtml->out, "</textarea>\r\n", NULL);
+ jhtml->textarea_flag--;
+
+ return jhtml->out;
+}
/*
* vim:ts=2 et
*/