X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/9043b46f85eb43c918a172663af34c084587bd1a..52fbcf2ffac0025128cc1d50681a7ccd859ef3f0:/html.c
diff --git a/html.c b/html.c
index 1305910..eb1c25d 100644
--- a/html.c
+++ b/html.c
@@ -138,7 +138,7 @@ void html_attr(const char *txt)
const char *t = txt;
while(t && *t){
int c = *t;
- if (c=='<' || c=='>' || c=='\'' || c=='\"') {
+ if (c=='<' || c=='>' || c=='\'' || c=='\"' || c=='&') {
html_raw(txt, t - txt);
if (c=='>')
html(">");
@@ -148,6 +148,8 @@ void html_attr(const char *txt)
html("'");
else if (c=='"')
html(""");
+ else if (c=='&')
+ html("&");
txt = t+1;
}
t++;
@@ -162,9 +164,9 @@ void html_url_path(const char *txt)
while(t && *t){
int c = *t;
const char *e = url_escape_table[c];
- if (e && c!='+' && c!='&' && c!='+') {
+ if (e && c!='+' && c!='&') {
html_raw(txt, t - txt);
- html_raw(e, 3);
+ html(e);
txt = t+1;
}
t++;
@@ -179,9 +181,11 @@ void html_url_arg(const char *txt)
while(t && *t){
int c = *t;
const char *e = url_escape_table[c];
+ if (c == ' ')
+ e = "+";
if (e) {
html_raw(txt, t - txt);
- html_raw(e, 3);
+ html(e);
txt = t+1;
}
t++;
@@ -211,6 +215,14 @@ void html_option(const char *value, const char *text, const char *selected_value
html("\n");
}
+void html_intoption(int value, const char *text, int selected_value)
+{
+ htmlf("");
+}
+
void html_link_open(const char *url, const char *title, const char *class)
{
html("