Google Groups

Paypal Module's BuyNowSnippet.buynow fails HTML5 validation


Damian Helme Apr 28, 2012 1:06 AM
Posted in group: Lift
It's a small point, but the W3 HTML5 validator complains about the HTML returned from the default BuyNowSnippet.buynow:

   def buynow(xhtml: NodeSeq): NodeSeq =
      <form name="_xclick"
            action={PaypalRules.connection.vend().protocol+"://"+PaypalRules.mode.vend().domain+"/cgi-bin/webscr"}
            method="post">
        <input type="hidden" name="cmd" value="_xclick" />
        <input type="hidden" name="amount" value={amount.toString} />
        <input type="hidden" name="currency_code" value={PaypalRules.currency.vend()} />
        { values.-("amount","currency_code","cmd","submit")
            .map(x => <input type="hidden" name={x._1} value={x._2} />) }
        <input type="image" src={PaypalRules.button.vend()} name="submit" alt="" /> // error here, alt=""
      </form>

Bad value for attribute alt on element input: String was empty.
… alt="" name="submit" type="image" src="/classpath/paypal/en_buynow_68x23.gif">
Syntax of non-empty string:
Any string that is not the empty string.

Worth opening a ticket for?

Damian.