mirror of
				https://github.com/osmarks/mycorrhiza.git
				synced 2025-10-30 23:23:04 +00:00 
			
		
		
		
	Get rid of " in some places
Violently
This commit is contained in:
		| @@ -2,11 +2,11 @@ package web | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"os" | ||||
| 	"io" | ||||
| 	"log" | ||||
| 	"mime" | ||||
| 	"net/http" | ||||
| 	"os" | ||||
| 	"sort" | ||||
|  | ||||
| 	"github.com/gorilla/mux" | ||||
| @@ -99,7 +99,7 @@ func handlerAdminUserEdit(w http.ResponseWriter, rq *http.Request) { | ||||
| 				return | ||||
| 			} | ||||
| 		} else { | ||||
| 			f = f.WithError(fmt.Errorf("invalid group \"%s\"", newGroup)) | ||||
| 			f = f.WithError(fmt.Errorf("invalid group ‘%s’", newGroup)) | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
|   | ||||
| @@ -60,7 +60,7 @@ func handlerRegister(w http.ResponseWriter, rq *http.Request) { | ||||
| 			err      = user.Register(username, password, "editor", "local", false) | ||||
| 		) | ||||
| 		if err != nil { | ||||
| 			log.Printf("Failed to register \"%s\": %s", username, err.Error()) | ||||
| 			log.Printf("Failed to register ‘%s’: %s", username, err.Error()) | ||||
| 			w.Header().Set("Content-Type", mime.TypeByExtension(".html")) | ||||
| 			w.WriteHeader(http.StatusBadRequest) | ||||
| 			fmt.Fprint( | ||||
| @@ -75,7 +75,7 @@ func handlerRegister(w http.ResponseWriter, rq *http.Request) { | ||||
| 				), | ||||
| 			) | ||||
| 		} else { | ||||
| 			log.Printf("Successfully registered \"%s\"", username) | ||||
| 			log.Printf("Successfully registered ‘%s’", username) | ||||
| 			user.LoginDataHTTP(w, rq, username, password) | ||||
| 			http.Redirect(w, rq, "/"+rq.URL.RawQuery, http.StatusSeeOther) | ||||
| 		} | ||||
|   | ||||
| @@ -40,7 +40,7 @@ func handlerHistory(w http.ResponseWriter, rq *http.Request) { | ||||
| 	log.Println("Found", len(revs), "revisions for", hyphaName) | ||||
|  | ||||
| 	util.HTTP200Page(w, views.BaseHTML( | ||||
| 		fmt.Sprintf("History of \"%s\"", util.BeautifulName(hyphaName)), | ||||
| 		fmt.Sprintf("History of %s", util.BeautifulName(hyphaName)), | ||||
| 		views.HistoryHTML(rq, hyphaName, list), | ||||
| 		user.FromRequest(rq))) | ||||
| } | ||||
|   | ||||
| @@ -57,7 +57,7 @@ func factoryHandlerAsker( | ||||
| 		util.HTTP200Page( | ||||
| 			w, | ||||
| 			views.BaseHTML( | ||||
| 				fmt.Sprintf(succTitleTemplate, hyphaName), | ||||
| 				fmt.Sprintf(succTitleTemplate, util.BeautifulName(hyphaName)), | ||||
| 				succPageTemplate(rq, hyphaName, h.Exists), | ||||
| 				u)) | ||||
| 	} | ||||
| @@ -163,7 +163,7 @@ func handlerEdit(w http.ResponseWriter, rq *http.Request) { | ||||
| 	util.HTTP200Page( | ||||
| 		w, | ||||
| 		views.BaseHTML( | ||||
| 			fmt.Sprintf("Edit \"%s\"", util.BeautifulName(hyphaName)), | ||||
| 			fmt.Sprintf("Edit %s", util.BeautifulName(hyphaName)), | ||||
| 			views.EditHTML(rq, hyphaName, textAreaFill, warning), | ||||
| 			u)) | ||||
| } | ||||
| @@ -198,7 +198,7 @@ func handlerUploadText(w http.ResponseWriter, rq *http.Request) { | ||||
| 		util.HTTP200Page( | ||||
| 			w, | ||||
| 			views.BaseHTML( | ||||
| 				fmt.Sprintf("Preview of \"%s\"", util.BeautifulName(hyphaName)), | ||||
| 				fmt.Sprintf("Preview of %s", util.BeautifulName(hyphaName)), | ||||
| 				views.PreviewHTML( | ||||
| 					rq, | ||||
| 					hyphaName, | ||||
|   | ||||
| @@ -41,7 +41,7 @@ func handlerAttachment(w http.ResponseWriter, rq *http.Request) { | ||||
| 	) | ||||
| 	util.HTTP200Page(w, | ||||
| 		views.BaseHTML( | ||||
| 			fmt.Sprintf("Attachment of \"%s\"", util.BeautifulName(hyphaName)), | ||||
| 			fmt.Sprintf("Attachment of %s", util.BeautifulName(hyphaName)), | ||||
| 			views.AttachmentMenuHTML(rq, h, u), | ||||
| 			u)) | ||||
| } | ||||
| @@ -58,7 +58,7 @@ func handlerPrimitiveDiff(w http.ResponseWriter, rq *http.Request) { | ||||
| 	) | ||||
| 	util.HTTP200Page(w, | ||||
| 		views.BaseHTML( | ||||
| 			fmt.Sprintf("Diff of \"%s\" at %s", util.BeautifulName(hyphaName), revHash), | ||||
| 			fmt.Sprintf("Diff of %s at %s", util.BeautifulName(hyphaName), revHash), | ||||
| 			views.PrimitiveDiffHTML(rq, h, u, revHash), | ||||
| 			u)) | ||||
| } | ||||
| @@ -88,7 +88,14 @@ func handlerRevision(w http.ResponseWriter, rq *http.Request) { | ||||
| 	) | ||||
| 	w.Header().Set("Content-Type", "text/html;charset=utf-8") | ||||
| 	w.WriteHeader(http.StatusOK) | ||||
| 	_, _ = fmt.Fprint(w, views.BaseHTML(util.BeautifulName(hyphaName), page, u)) | ||||
| 	_, _ = fmt.Fprint( | ||||
| 		w, | ||||
| 		views.BaseHTML( | ||||
| 			fmt.Sprintf(`%s at %s`, util.BeautifulName(hyphaName), revHash), | ||||
| 			page, | ||||
| 			u, | ||||
| 		), | ||||
| 	) | ||||
| } | ||||
|  | ||||
| // handlerText serves raw source text of the hypha. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Timur Ismagilov
					Timur Ismagilov