var ricordaliaslist=0;
var actinput=0;
var numeroazioniannullate=0;
-var terminecic="";var listaliases="";var choices;var vlds=new Array();//contengono i parametri per dialogare col server in caso di ambiguità nella Match Conclusion.
+var terminecic="";var listaliases="";var choices="";var interpretation_choices="";var vlds=new Array();//contengono i parametri per dialogare col server in caso di ambiguità nella Match Conclusion.
aliasglob=new Array();//per conservare la lista degli alias
function initialize()
{
function ask_uwobo(url)
{
return (top.topurl+"/ask_uwobo?url="+
- escape(processorURL + "apply?" +
- "xmluri=" + escape(url) +
- "&keys=" + escape(thkeys) +
- "¶m.processorURL=" + escape(processorURL) +
- "¶m.getterURL=" + escape(getterURL) +
- "¶m.proofcheckerURL=" + escape(proofcheckerURL) +
- "¶m.draw_graphURL=" + escape(draw_graphURL) +
- "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
- "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
- "¶m.keys=" + escape(keys) +
- "¶m.thkeys=" + escape(thkeys) +
- "¶m.embedkeys=" + escape(embedkeys) +
- "¶m.doctype-public=" + escape(doctype_public) +
- "¶m.encoding=" + escape(encoding) +
- "¶m.thencoding=" + escape(thencoding) +
- "¶m.media-type=" + escape(media_type) +
- "¶m.thmedia-type=" + escape(thmedia_type) +
- "¶m.interfaceURL=" + escape(interfaceURL) +
- "¶m.thinterfaceURL=" + escape(thinterfaceURL) +
- "¶m.CICURI=" + escape(CICURI) +
- "¶m.naturalLanguage=" + escape(naturalLanguage) +
- "¶m.annotations=" + escape(annotations) +
- "¶m.topurl=" + escape(interface_topurl) +
- "&prop.method=html"));
+ encodeURIComponent(processorURL + "apply?" +
+ "xmluri=" + encodeURIComponent(url) +
+ "&keys=" + encodeURIComponent(thkeys) +
+ "¶m.processorURL=" + encodeURIComponent(processorURL) +
+ "¶m.getterURL=" + encodeURIComponent(getterURL) +
+ "¶m.proofcheckerURL=" + encodeURIComponent(proofcheckerURL) +
+ "¶m.draw_graphURL=" + encodeURIComponent(draw_graphURL) +
+ "¶m.uri_set_queueURL=" + encodeURIComponent(uri_set_queueURL) +
+ "¶m.UNICODEvsSYMBOL=" + encodeURIComponent(UNICODEvsSYMBOL) +
+ "¶m.keys=" + encodeURIComponent(keys) +
+ "¶m.thkeys=" + encodeURIComponent(thkeys) +
+ "¶m.embedkeys=" + encodeURIComponent(embedkeys) +
+ "¶m.doctype-public=" + encodeURIComponent(doctype_public) +
+ "¶m.encoding=" + encodeURIComponent(encoding) +
+ "¶m.thencoding=" + encodeURIComponent(thencoding) +
+ "¶m.media-type=" + encodeURIComponent(media_type) +
+ "¶m.thmedia-type=" + encodeURIComponent(thmedia_type) +
+ "¶m.interfaceURL=" + encodeURIComponent(interfaceURL) +
+ "¶m.thinterfaceURL=" + encodeURIComponent(thinterfaceURL) +
+ "¶m.CICURI=" + encodeURIComponent(CICURI) +
+ "¶m.naturalLanguage=" + encodeURIComponent(naturalLanguage) +
+ "¶m.annotations=" + encodeURIComponent(annotations) +
+ "¶m.topurl=" + encodeURIComponent(interface_topurl) +
+ "&prop.method=html" +
+ "¶m.expandasking=" + encodeURIComponent(top.topurl)));
}
function help(w) // quando invocata, visualizza l' help relativo ad un oggetto. Di solito è legata ad un evento onFocus o onMouseOver.
{
top.vlds[top.vlds.length]=";";
for (j=0;j<top.vlds.length;j++)
{
- choices=choices+(top.vlds[j]==";"?";":escape(top.vlds[j]))+" ";
+ choices=choices+(top.vlds[j]==";"?";":encodeURIComponent(top.vlds[j]))+" ";
}
choices=choices.substring(0,choices.length-2);
top.choices = choices;
- stringa=stringa+escape(choices);
+ stringa=stringa+encodeURIComponent(choices);
if (top.vlds.length==vecchiavlds){alert("You must select at least one of the options.");}
else
{
function templateambigpdq2_invia(document,elenco)
{
stringa=top.topurl+"/"+top.current_query+"?term="+top.terminecic;
- stringa=stringa+"&aliases=";
- controllo=stringa.length;
+ stringa=stringa+"&aliases="+encodeURIComponent(top.listaliases)+"&choices="+encodeURIComponent(top.choices)+"&interpretation_choices=";
+ var parsa = "";
+ controllo=parsa.length;
for (j=0;j<elenco.length;j++)
{
if (document.disamb.interp[j].checked)
{
- stringa=stringa+escape(elenco[j]);
+ parsa=parsa+encodeURIComponent(elenco[j]);
// TODO da implementare nella terza fase
//top.aliasglob[top.aliasglob.length]=document.disamb.interp[j].value;
}
}
- if (stringa.length!=controllo)
+ top.interpretation_choices = parsa;
+ stringa=stringa+parsa;
+ if (parsa.length!=controllo)
{
window.open(ask_uwobo(stringa),"cw");
}
function constraints_choice_template_invia(document,aliases,constr_obj_len,constr_rel_len,constr_sort_len)
{
stringa=top.topurl+"/"+top.current_query+"?term="+top.terminecic;
- stringa=stringa+"&aliases="+escape(aliases);
- stringa=stringa+"&choices="+escape(top.choices);
+ stringa=stringa+"&aliases="+encodeURIComponent(aliases);
+ stringa=stringa+"&choices="+encodeURIComponent(top.choices);
+ stringa=stringa+"&interpretation_choices="+encodeURIComponent(top.interpretation_choices);
stringa=stringa+"&constraints=";
for (j=0;j<constr_obj_len;j++)
{