[orca] 618334 - SD python bindings crashes when receiving newline followed by full stop.



commit 68055358d0b28c72bcf638d9897709969a88e8c9
Author: Mesar Hameed <mhameed src gnome org>
Date:   Sun May 16 09:11:01 2010 +0100

    618334 - SD python bindings crashes when receiving newline followed by full stop.

 src/orca/speechdispatcherfactory.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/speechdispatcherfactory.py b/src/orca/speechdispatcherfactory.py
index 0a906bf..3461a0d 100644
--- a/src/orca/speechdispatcherfactory.py
+++ b/src/orca/speechdispatcherfactory.py
@@ -251,6 +251,12 @@ class SpeechServer(speechserver.SpeechServer):
         # synthesizers cannot handle them.  See bug #591734.
         #
         text = text.decode("UTF-8").replace(u'\u00a0', ' ').encode("UTF-8")
+
+        # Replace newline followed by full stop, since
+        # this seems to crash sd, see bgo#618334.
+        #
+        text = text.replace('\n.', '\n')
+
         self._apply_acss(acss)
         self._send_command(self._client.speak, text, **kwargs)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]