# Mailer Behavior for Radiant XHTML Bug

**URL:** <https://www.ruby-forum.com/t/mailer-behavior-for-radiant-xhtml-bug/68540>\
**Category:** Radiant CMS\
**Created:** [September 13, 2006, 2:07pm UTC](https://www.ruby-forum.com/t/mailer-behavior-for-radiant-xhtml-bug/68540 "2006-09-13T14:07:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pezdude](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a87d85/32.png) [@pezdude](https://www.ruby-forum.com/u/pezdude)\
**Post date:** [September 13, 2006, 2:07pm UTC](https://www.ruby-forum.com/t/mailer-behavior-for-radiant-xhtml-bug/68540/1 "2006-09-13T14:07:08Z")

</div>

Hi,

While validating my XHTML pages I got an error from the Mailer Behavior:

```
  # Build the html form tag...
  results = %Q(<form action="#{ url }" method="POST"

```

can be

```
  # Build the html form tag...
  results = %Q(<form action="#{ url }" method="post"

```

and it validates. I’m not sure why it is capitalised? 🙂

–  
Regards,  
Dave

---

<div class="post-metadata">

**Author:** ![pezdude](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a87d85/32.png) [@pezdude](https://www.ruby-forum.com/u/pezdude)\
**Post date:** [September 13, 2006, 10:12pm UTC](https://www.ruby-forum.com/t/mailer-behavior-for-radiant-xhtml-bug/68540/2 "2006-09-13T22:12:24Z")

</div>

On 9/13/06, Dave C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ```
> results = %Q(<form action="#{ url }" method="post"
> 
> ```
> 
> and it validates. I’m not sure why it is capitalised? 🙂

The HTTP 1.1 spec says it needs to be:

[http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.1](http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.1)

I can’t imagine how that would affect validation. What is the  
validation error you were/are getting?

-Tom

---

<div class="post-metadata">

**Author:** ![pezdude](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a87d85/32.png) [@pezdude](https://www.ruby-forum.com/u/pezdude)\
**Post date:** [September 14, 2006, 12:46am UTC](https://www.ruby-forum.com/t/mailer-behavior-for-radiant-xhtml-bug/68540/3 "2006-09-14T00:46:45Z")

</div>

On 13/09/06, Tom von Schwerdtner [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> The HTTP 1.1 spec says it needs to be:
> 
> [HTTP/1.1: Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.1)
> 
> I can’t imagine how that would affect validation. What is the  
> validation error you were/are getting?

[http://validator.w3.org/check?uri=http%3A%2F%2Fuk.tug.org%2Fcontact](http://validator.w3.org/check?uri=http%3A%2F%2Fuk.tug.org%2Fcontact)

–  
Regards,  
Dave

---

<div class="post-metadata">

**Author:** ![pezdude](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a87d85/32.png) [@pezdude](https://www.ruby-forum.com/u/pezdude)\
**Post date:** [September 14, 2006, 3:14am UTC](https://www.ruby-forum.com/t/mailer-behavior-for-radiant-xhtml-bug/68540/4 "2006-09-14T03:14:55Z")

</div>

Dave C. wrote:

> and it validates. I’m not sure why it is capitalised? 🙂  
> Dave, perhaps you could create a patch for this and send it to Matt  
> McCray. Plugins are pretty easy to modify.

–  
John L.  
htpt://wiseheartdesign.com

---

<div class="post-metadata">

**Author:** ![pezdude](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a87d85/32.png) [@pezdude](https://www.ruby-forum.com/u/pezdude)\
**Post date:** [September 14, 2006, 4:47am UTC](https://www.ruby-forum.com/t/mailer-behavior-for-radiant-xhtml-bug/68540/5 "2006-09-14T04:47:09Z")

</div>

On Sep 14, 2006, at 5:10 AM, Tom von Schwerdtner wrote:

> > 
> 
> I can’t imagine how that would affect validation. What is the  
> validation error you were/are getting?

The HTTP spec isn’t relevant when validating xhtml. When the browser  
talks to the server over HTTP it has to be uppercase, but in xhtml  
(judging from these validation results) it needs to be lowercase (and  
thus the browser must convert it before talking to the server).

Not all that useful, but just in case anyone cares (^\_^)

Bodhi

---

<div class="post-metadata">

**Author:** ![pezdude](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a87d85/32.png) [@pezdude](https://www.ruby-forum.com/u/pezdude)\
**Post date:** [September 14, 2006, 8:22am UTC](https://www.ruby-forum.com/t/mailer-behavior-for-radiant-xhtml-bug/68540/6 "2006-09-14T08:22:12Z")

</div>

On 14/09/06, John W. Long [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Dave, perhaps you could create a patch for this and send it to Matt  
> McCray. Plugins are pretty easy to modify.

Could you point me in the direction of tutorials to do this? I’m happy  
to but don’t know how 🙂

When I just changed the lib/mailer.rb file then my changes did not  
take effect, so I put the \<r:\> code for the form in an \<r:comment\> and  
copy and pasted the generated XHTML form back into the page part and  
edited it from there, both for XHTML compliance and for accessibility  
with fieldset and legend tags, which need all inputs to have id  
attributes.

Contact Us Name  
Email  
Message Enter Message Here  

–  
Regards,  
Dave

---

<div class="post-metadata">

**Author:** ![pezdude](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a87d85/32.png) [@pezdude](https://www.ruby-forum.com/u/pezdude)\
**Post date:** [September 14, 2006, 6:15pm UTC](https://www.ruby-forum.com/t/mailer-behavior-for-radiant-xhtml-bug/68540/7 "2006-09-14T18:15:23Z")

</div>

On 9/13/06, Bodhi [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > ```
> > > results = %Q(<form action="#{ url }" method="POST"
> > > 
> > > ```
> 
> Not all that useful, but just in case anyone cares (^\_^)  
> Ah, good point.

-Tom
