私はコントローラからのリモートmthodが呼び出されているvfページを持っています。下記のメソッドを呼び出すために私のjavascriptのは、 `別のvfページへのリモート呼び出しが動作しません
LeadLocatorPreProcessorControllerV2.openLocatorPage($scope.CustomerSite.AddressID,function(results,event){
console.log(results);
window.open(results,"_self");
});//Abhinav `
で、私のコントローラメソッドは
`@RemoteAction
public static PageReference openLocatorPage(String addressId){
Address__c addr = [SELECT Id, Name, Latitude__c, Longitude__c FROM Address__c WHERE Id = :addressId];
Decimal latitude = addr.Latitude__c;
Decimal longitude = addr.Longitude__c;
String urlLocatorPage = '/apex/LeadLocator?lat='+latitude+'&lon='+longitude;
PageReference pr = new PageReference(urlLocatorPage);
return pr;
}`
さて問題は、コントローラ内に形成された私のURLが/頂点/ LeadLocator /緯度= 1234 &経度であるということです= 1234しかし、コンソールにログオンすると、次のurl/apex/LeadLocator/lat = 1234 & amp; lon = 1234が得られます。 私のURLが変更されてampが追加される理由を教えてもらえますか? javascriptの結果でそれ自身に。 JavaScriptを「&」はHTMLおよびスクリプトインジェクション、クッキーの盗難や他のウェブ悪用などのセキュリティ上の理由から、そのエンティティタイプ(&)
にあなたのコントローラから返さエスケープしますので おかげ