.NET에서 이러한 문자를 이스케이프 처리 할 수있는 방법이 있습니까?. NET에서 이스케이프 문자?
PHP 코드가 포함 된 문자열을 ajax를 통해 .NET 메소드로 보내고 있습니다.
는이 방법은 다음 이메일을 통해 전송하지만 그들은 jQuery를 이스케이프 되었기 때문에 것 같습니다 : 나는이 이메일을 통해 전송되기 전에 언 이스케이프 할 필요가
<?php print $test; ?>
Looks like:
%3C%3Fphp%0A%0Aprint%20%24test%3B%0A%0A%3F%3E
을 그래서 기본적으로.
EDIT 아직도 캔트이 여전히 실 거예요 필드의 내용을 보내 일을 얻는다.
public static string CreateSnippet(int processid)
{
//here we find form values posted to the current page
HttpRequest post = HttpContext.Current.Request;
string email = post["email"];
string comment = post["comment"];
string name = post["name"];
string website = post["website"];
var DecodedString = HttpContext.Current.Server.UrlDecode(comment);
var mailcontent = new StringBuilder();
mailcontent.AppendFormat(EmailLineFormat, "Name", name);
mailcontent.AppendFormat(EmailLineFormat, "Email", email);
mailcontent.AppendFormat(EmailLineFormat, "Website", website);
mailcontent.AppendFormat(EmailLineFormat, "Message", DecodedString);
// Send the email
library.SendMail("[email protected]", "[email protected]", "Contact Form Enquiry", mailcontent.ToString(), true);
//if nothing gets created, we return zero
return "success";
}
올바른 방법으로 사용하고 있습니까? 아니면 변수를 설정하는 데 문제가 있습니까?
감사 로버트
이 제목은 내 휴식을 폭발시킵니다. – Hamish