GithubHelp home page GithubHelp logo

Meta charset about kotlinx.html HOT 6 CLOSED

kotlin avatar kotlin commented on August 22, 2024
Meta charset

from kotlinx.html.

Comments (6)

cy6erGn0m avatar cy6erGn0m commented on August 22, 2024 1

Btw, this should be better than unsafe

meta { charset = "utf-8" }

however I also added charset parameter to the builder function as well

from kotlinx.html.

Miha-x64 avatar Miha-x64 commented on August 22, 2024

UPDATE. This was stupid, I've forgot +. I don't know where I've found this coode construct.
Original comment:

Also, this code

head {
    unsafe {
        raw("<meta charset=\"UTF-8\" />")
    }
    title("$titleText — Admin")
}

executes to

<!DOCTYPE html>
<html>
  <head>
    <title>Crud index — Admin</title>
  </head>
</html>

This is very sad that 'type-safe' builder just throws some code away.

from kotlinx.html.

cy6erGn0m avatar cy6erGn0m commented on August 22, 2024

Is it DOM builder or stream? JS or JVM?

from kotlinx.html.

Miha-x64 avatar Miha-x64 commented on August 22, 2024

It's ApplicationCall#respondHtml extension in Ktor. It uses writer.appendHTML().html(builder) — looks like stream for me. JVM.

from kotlinx.html.

cy6erGn0m avatar cy6erGn0m commented on August 22, 2024

I can't reproduce this. I've just added two tests and both works well. Are you sure that it hasn't been removed by some other tool? (for example, because of tag close for meta that doesn't conform to the specification)

from kotlinx.html.

Miha-x64 avatar Miha-x64 commented on August 22, 2024

Can't reproduce this? It was edited two days ago, that was my fault...

from kotlinx.html.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.