@@ -1126,22 +1126,31 @@ def startTagIsIndex(self, token):
1126
1126
self .parser .parseError ("deprecated-tag" , {"name" : "isindex" })
1127
1127
if self .tree .formPointer :
1128
1128
return
1129
- self .processStartTag (impliedTagToken ("form" , "StartTag" ))
1129
+ form_attrs = {}
1130
+ if "action" in token ["data" ]:
1131
+ form_attrs ["action" ] = token ["data" ]["action" ]
1132
+ self .processStartTag (impliedTagToken ("form" , "StartTag" ,
1133
+ attributes = form_attrs ))
1130
1134
self .processStartTag (impliedTagToken ("hr" , "StartTag" ))
1131
- self .processStartTag (impliedTagToken ("p" , "StartTag" ))
1132
1135
self .processStartTag (impliedTagToken ("label" , "StartTag" ))
1133
1136
# XXX Localization ...
1137
+ if "prompt" in token ["data" ]:
1138
+ prompt = token ["data" ]["prompt" ]
1139
+ else :
1140
+ prompt = "This is a searchable index. Insert your search keywords here: "
1134
1141
self .processCharacters (
1135
- {"type" :tokenTypes ["Characters" ],
1136
- "data" :"This is a searchable index. Insert your search keywords here: " })
1137
- attributes = token ["data" ].copy () #don't really need a copy here I think
1142
+ {"type" :tokenTypes ["Characters" ], "data" :prompt })
1143
+ attributes = token ["data" ].copy ()
1144
+ if "action" in attributes :
1145
+ del attributes ["action" ]
1146
+ if "prompt" in attributes :
1147
+ del attributes ["prompt" ]
1138
1148
attributes ["name" ] = "isindex"
1139
1149
self .processStartTag (impliedTagToken ("input" , "StartTag" ,
1140
1150
attributes = attributes ,
1141
1151
selfClosing =
1142
1152
token ["selfClosing" ]))
1143
1153
self .processEndTag (impliedTagToken ("label" ))
1144
- self .processEndTag (impliedTagToken ("p" ))
1145
1154
self .processStartTag (impliedTagToken ("hr" , "StartTag" ))
1146
1155
self .processEndTag (impliedTagToken ("form" ))
1147
1156
@@ -1612,10 +1621,7 @@ def startTagTable(self, token):
1612
1621
self .parser .phase .processStartTag (token )
1613
1622
1614
1623
def startTagStyleScript (self , token ):
1615
- if "tainted" not in self .getCurrentTable ()._flags :
1616
- self .parser .phases ["inHead" ].processStartTag (token )
1617
- else :
1618
- self .startTagOther (token )
1624
+ self .parser .phases ["inHead" ].processStartTag (token )
1619
1625
1620
1626
def startTagInput (self , token ):
1621
1627
if ("type" in token ["data" ] and
0 commit comments