Subversion Repositories Applications.papyrus

Rev

Rev 1688 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1688 Rev 1921
Line 24... Line 24...
24
 
24
 
25
// encodeForPost
25
// encodeForPost
26
function encodeForPost( str ) {
26
function encodeForPost( str ) {
27
	var s = new String( str );
27
	var s = new String( str );
28
	s = encodeURIComponent( s );
28
	s = encodeURIComponent( s );
29
	// additionally encode single quotes to evade any PHP 
29
	// additionally encode single quotes to evade any PHP
30
	// magic_quotes_gpc setting (it inserts escape characters and 
30
	// magic_quotes_gpc setting (it inserts escape characters and
31
	// therefore skews the btye positions of misspelled words)
31
	// therefore skews the btye positions of misspelled words)
32
	return s.replace( /\'/g, '%27' );
32
	return s.replace( /\'/g, '%27' );
Line 33... Line 33...
33
}
33
}