Skip to content

Commit

Permalink
Fixed an encoding issue with international characters in Xed.
Browse files Browse the repository at this point in the history
  • Loading branch information
John Luxford committed Oct 7, 2008
1 parent f22aaf6 commit 2611366
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion inc/app/xed/html/xed.spt
Expand Up @@ -482,7 +482,7 @@ function formchooser_handler () {

xed_templates = new Array ();
{loop obj.templates}
xed_templates['{loop/id}'] = '{loop/body}';
xed_templates['{loop/id}'] = '{filter none}{loop/body}{end filter}';
{end loop}

var rpc_handler = new Function (
Expand Down
2 changes: 1 addition & 1 deletion inc/app/xed/js/xed-compressed.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions inc/app/xed/js/xed.js
Expand Up @@ -118,6 +118,13 @@ function xed_do_nothing (n) {}
// call this in the onload attribute of the body
// ie. onload="xed_init ('editor')"
function xed_init (ifname) {
// decode initial values
xed_initial_value[ifname] = decodeURIComponent (xed_initial_value[ifname]);
xed_scroller_data = decodeURIComponent (xed_scroller_data);
for (var i = 0; i < xed_templates.length; i++) {
xed_templates[i] = decodeURIComponent (xed_templates[i]);
}

e = document.getElementById (ifname);
e.contentWindow.document.designMode = 'on';
if (xed_safari) {
Expand Down
6 changes: 3 additions & 3 deletions inc/app/xed/lib/Widget/Xeditor.php
Expand Up @@ -135,9 +135,9 @@ function getValue ($cgi = '') {
}

function formatValue ($value) {
$value = preg_replace ("/(\r\n|\n\r|\r|\n)/", "'\n\t\t+ '\\n", addslashes ($value));
$value = str_replace ('</script>', '</\' + \'script>', $value);
return $value;
//$value = preg_replace ("/(\r\n|\n\r|\r|\n)/", "'\n\t\t+ '\\n", addslashes ($value));
//$value = str_replace ('</script>', '</\' + \'script>', $value);
return rawurlencode ($value);
}

/*! <method name="display" access="public">
Expand Down
1 change: 1 addition & 0 deletions install/changes.txt
Expand Up @@ -8,6 +8,7 @@ Changes in 5.0.2-stable
- Fixed issue with many team permissions - NOTE: Requires upgrade utility run.
- Removed change history from browse if page is locked/not editable.
- All related collections can now be disabled with their apps.
- Fixed an encoding issue with international characters in Xed.

Changes in 5.0.1-stable

Expand Down

0 comments on commit 2611366

Please sign in to comment.