void anyTagEnd(const char *tag, int tag_len, int close_it);
void attribute(const char *tag, int tag_len,
const char *attr, int attr_len,
- const char *value, int val_len);
+ const char *value, int val_len,
+ const char *sep);
void closeTag(const char *tag, int tag_len);
void text(const char *value, int len);
const Phase *m_phase;
void yf::HttpRewrite::Event::attribute(const char *tag, int tag_len,
const char *attr, int attr_len,
- const char *value, int val_len)
+ const char *value, int val_len,
+ const char *sep)
{
std::list<Within>::const_iterator it = m_phase->within_list.begin();
bool subst = false;
wrbuf_putc(m_w, ' ');
wrbuf_write(m_w, attr, attr_len);
- wrbuf_puts(m_w, "=\"");
-
- std::string output;
- if (subst)
+ if (value)
{
- std::string input(value, val_len);
- output = it->rule->test_patterns(m_vars, input);
+ wrbuf_puts(m_w, "=");
+ wrbuf_puts(m_w, sep);
+
+ std::string output;
+ if (subst)
+ {
+ std::string input(value, val_len);
+ output = it->rule->test_patterns(m_vars, input);
+ }
+ if (output.empty())
+ wrbuf_write(m_w, value, val_len);
+ else
+ wrbuf_puts(m_w, output.c_str());
+ wrbuf_puts(m_w, sep);
}
- if (output.empty())
- wrbuf_write(m_w, value, val_len);
- else
- wrbuf_puts(m_w, output.c_str());
- wrbuf_puts(m_w, "\"");
}
void yf::HttpRewrite::Event::closeTag(const char *tag, int tag_len)