From 78e1ce79d41c19874cda2d52161e5371d3aad9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Sat, 8 Dec 2007 15:39:39 +0000 Subject: [PATCH] * lib/lyx2lyx/lyx_1_5.py: - fix bug 4333. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@22020 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/lyx2lyx/lyx_1_5.py | 12 ++++++------ status.15x | 3 +++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/lyx2lyx/lyx_1_5.py b/lib/lyx2lyx/lyx_1_5.py index 77c80b242e..762d92be4d 100644 --- a/lib/lyx2lyx/lyx_1_5.py +++ b/lib/lyx2lyx/lyx_1_5.py @@ -653,17 +653,17 @@ def convert_commandparams(document): if commandparams_info[name][0] == "": document.warning("Ignoring invalid option `%s' of command `%s'." % (option1, name)) else: - lines.append('%s "%s"' % (commandparams_info[name][0], option1.replace('"', '\\"'))) + lines.append('%s "%s"' % (commandparams_info[name][0], option1.replace('\\', '\\\\').replace('"', '\\"'))) if option2 != "": if commandparams_info[name][1] == "": document.warning("Ignoring invalid second option `%s' of command `%s'." % (option2, name)) else: - lines.append('%s "%s"' % (commandparams_info[name][1], option2.replace('"', '\\"'))) + lines.append('%s "%s"' % (commandparams_info[name][1], option2.replace('\\', '\\\\').replace('"', '\\"'))) if argument != "": if commandparams_info[name][2] == "": document.warning("Ignoring invalid argument `%s' of command `%s'." % (argument, name)) else: - lines.append('%s "%s"' % (commandparams_info[name][2], argument.replace('"', '\\"'))) + lines.append('%s "%s"' % (commandparams_info[name][2], argument.replace('\\', '\\\\').replace('"', '\\"'))) document.body[i:i+1] = lines i = i + 1 @@ -690,13 +690,13 @@ def revert_commandparams(document): preview_line = document.body[k] elif (commandparams_info[name][0] != "" and pname == commandparams_info[name][0]): - option1 = pvalue.strip('"').replace('\\"', '"') + option1 = pvalue.strip('"').replace('\\"', '"').replace('\\\\', '\\') elif (commandparams_info[name][1] != "" and pname == commandparams_info[name][1]): - option2 = pvalue.strip('"').replace('\\"', '"') + option2 = pvalue.strip('"').replace('\\"', '"').replace('\\\\', '\\') elif (commandparams_info[name][2] != "" and pname == commandparams_info[name][2]): - argument = pvalue.strip('"').replace('\\"', '"') + argument = pvalue.strip('"').replace('\\"', '"').replace('\\\\', '\\') elif document.body[k].strip() != "": document.warning("Ignoring unknown contents `%s' in command inset %s." % (document.body[k], name)) if name == "bibitem": diff --git a/status.15x b/status.15x index 3d5da6a115..5c13482e14 100644 --- a/status.15x +++ b/status.15x @@ -98,6 +98,9 @@ What's new - Fix a crash when exporting a file with a branch from the command line (bug 4255). +- Fix a crash when importing an older LyX file (version < 1.5.0) that + contains index entries with escaped umlauts (bug 4333). + - Exit gracefully and give the user some information if LyX catches an exception from an external program, such as iconv (part of bug 4385).