Giter Club home page Giter Club logo

Comments (8)

Anahkiasen avatar Anahkiasen commented on June 12, 2024

Do you have an example of code that doesn't work so that I can write a test for it, to make sure the bug doesn't come back ?

from html-object.

rseyferth avatar rseyferth commented on June 12, 2024

I used this code:

// Add input
$inputCsrfName = Input::hidden("csrfName", $this->_csrfName);
echo $inputCsrfName;

from html-object.

Anahkiasen avatar Anahkiasen commented on June 12, 2024

That outputs the correct HTML for me :

$input = Input::hidden('csrf', 'foobar');

var_dump($input->render());
// string(48) "<input type="hidden" name="csrf" value="foobar">"

What do you get ?

from html-object.

rseyferth avatar rseyferth commented on June 12, 2024

Yeah, that's what I get too, but it should have a closing / at the end:

<input type="hidden" name="csrf" value="foobar" />

from html-object.

Anahkiasen avatar Anahkiasen commented on June 12, 2024

Well if it's HTML5 and not xHTML then no, it shouldn't.

from html-object.

rseyferth avatar rseyferth commented on June 12, 2024

Ah, I guess you're right. I've been using them in HTML5 as well, even though they're no longer mandatory...

Maybe a static configuration variable might be useful then, so it can work both ways? Like

public static $useSelfClosingSlash = false;

from html-object.

Anahkiasen avatar Anahkiasen commented on June 12, 2024

Hm that could be done I guess, will work on it.

from html-object.

rseyferth avatar rseyferth commented on June 12, 2024

Cool. I'm a bit new to Github, but I'll try to fork the project and add it there, so you can see if you like the fix.

from html-object.

Related Issues (19)

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.