bigskysoftware / bigskysoftware/htmx
<image> response for <svg> is transformed into <img>
- Dominant language
- JavaScript
- Stars
- 49.4k
- Forks
- 1.7k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 30
Description
I have an svg with an `` tag like this:
```
```
The response of `POST /doSomething` is another ``:
```
```
However, the result is that inside the ``, an `` element is placed, instead of `
`:
**Result**:
```
```
**Expected**:
```
```
Minimal server to showcase the behaviour:
```
package main
import (
"fmt"
"log"
"net/http"
)
func homeHandler(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case "GET":
fmt.Fprintf(w, `
`)
default:
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
}
}
func doSomethingHandler(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case "POST":
fmt.Fprintf(w, `
`)
default:
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
}
}
func main() {
http.HandleFunc("/", homeHandler)
http.HandleFunc("/doSomething", doSomethingHandler)
fmt.Println("Server is running at http://localhost:8080")
log.Fatal(http.ListenAndServe(":8080", nil))
}
```
Contributor guide
Assessment
This issue has not been assessed yet.