Re: [Html2wml] some questions about source code of html2wml
Brought to you by:
maddingue
|
From: Sébastien Aperghis-T. <mad...@fr...> - 2009-07-05 20:43:41
|
fanfeihu wrote:
> hello,
Hello,
> I have some question when I used the source code of html2wml. I
> found there is "checkbox" in wml after translated ,but now it is
> not supported by wap device. can you tell me how to modify it ? I
> am not very family with perl.
I haven't touched Html2Wml or WML in years. Looking at the
specification, input type can only be "text" or "password" in WML
1.x. The following patch should fix it:
--- devel/html2wml.cgi 2005-12-21 18:59:25.000000000 +0100
+++ devel/html2wml.cgi 2009-07-05 22:38:27.000000000 +0200
@@ -1042,6 +1042,11 @@
$state{output} .= q|<setvar name="|. $attr->{name} .q|"
value="|. $attr->{value} .q|"/>|;
return;
}
+
+ ## in WML 1.x, type can be only "text" or "password"
+ elsif ($attr->{type} ne "text" or $attr->{type} ne
"password") {
+ $attr->{type} = "text";
+ }
}
## special case: form submission
__END_OF_PATCH__
--
Sébastien Aperghis-Tramoni
Close the world, txEn eht nepO.
|