When trying to "Copy as RTF" some PHP code, the syntax highlighting does not come through correctly.
Paste this code into Sc1:
<?
$fields = array(
'version'=>urlencode('2009-11-20'),
'SignatureVersion'=>urlencode('1'),
'Action'=>urlencode('UserUpdate'),
'UserEmail'=>urlencode('me@mail.com'),
'payload'=>urlencode('<?xml version="1.0" encoding="UTF-8"?><user><profile><field id=\"6\"><value>MemberId</value></field></profile></user>'),
);
$fields_string = '';
foreach($fields as $key=>$value)
{
$fields_string .= $key.'='.$value.'&';
}
rtrim($fields_string,'&');
$options = array (
CURLOPT_URL => 'http://site.com/api/endpoint',
CURLOPT_USERPWD => 'user:password',
CURLOPT_RETURNTRANSFER => true, // return web page
CURLOPT_USERAGENT => 'User Agent', // who am i
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $fields_string,
);
$ch = curl_init();
curl_setopt_array($ch, $options);
$content = curl_exec($ch);
$headers = curl_getinfo($ch);
print("UserGet Content: " . print_r($content, true) . "\n");
?>
Now, select all and "Copy as RTF". Paste into MS Word (or similar). Notice how the opening and closing PHP code is highlighted in yellow, all of the text has the font copied correctly, but there is no syntax highlighting. All code is black. I have attached an example. Other language types do not have this problem.
Pasted RTF code
Since I don't use this feature, I will not be fixing it myself.
4HTh6k <a href="http://hrlojhatyvsr.com/">hrlojhatyvsr</a>, [url=http://dgguuwjzxxhb.com/]dgguuwjzxxhb[/url], [link=http://qkgcrssjvofq.com/]qkgcrssjvofq[/link], http://fopmoeziannm.com/
Fix committed as [f3900b].
Related
Commit: [f3900b]