]> Git repositories of Nishi - repoview.git/commitdiff
fix title
authorNishi <nishi@nishi.boats>
Sat, 24 Aug 2024 08:48:19 +0000 (08:48 +0000)
committerNishi <nishi@nishi.boats>
Sat, 24 Aug 2024 08:48:19 +0000 (08:48 +0000)
git-svn-id: file:///raid/svn-personal/repoview/trunk@70 7e8b2a19-8934-dd40-8cb3-db22cdd5a80f

CGI/theme/modern.c
repoview/mod_repoview.c

index 269885b1b4dc3baeeab7912be5680793b6481f9e..c6e10bca556db4b1ef423e63de5bf6500cef71cf 100644 (file)
@@ -934,6 +934,8 @@ char* escape(const char* str) {
 
 void render_stuff(void) {
        char* escaped;
+       char cbuf[2];
+       cbuf[1] = 0;
        add_data(&buffer, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n");
        add_data(&buffer, "<html>\n");
        add_data(&buffer, "     <head>\n");
@@ -941,7 +943,18 @@ void render_stuff(void) {
        add_data(&buffer, "             <title>");
        add_data(&buffer, INSTANCE_NAME);
        add_data(&buffer, " - ");
-       add_data(&buffer, title);
+       int i;
+       bool br = false;
+       for(i = 0; title[i] != 0; i++){
+               if(title[i] == '<'){
+                       br = true;
+               }else if(title[i] == '>'){
+                       br = false;
+               }else if(!br){
+                       cbuf[0] = title[i];
+                       add_data(&buffer, cbuf);
+               }
+       }
        add_data(&buffer, "</title>\n");
        add_data(&buffer, "             <style type=\"text/css\">\n");
        add_data(&buffer, "* {\n");
index dda6f0eb04d88f33e70f0aca683d227f728348dd..30abf9ebbf3cc243b76bf5271bdc0f63ba9321f7 100644 (file)
@@ -45,7 +45,7 @@
 /* The sample content handler */
 static int repoview_handler(request_rec *r)
 {
-    if (strcmp(r->handler, "repoview")) {
+    if (strcmp(r->handler, "repoview-handler")) {
         return DECLINED;
     }
     r->content_type = "text/html";