[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Fix SSML escaping while inserting index marks.
From: |
Christopher Brannon |
Subject: |
[PATCH] Fix SSML escaping while inserting index marks. |
Date: |
Sun, 27 Feb 2011 21:59:20 +0000 |
From: Christopher Brannon <address@hidden>
To: address@hidden
We add index marks after period and question-mark characters,
if they are followed by <, &, or whitespace.
However, the character following the period was being directly inserted
into the transformed message. If it needs to be escaped, the escaping
was not taking place.
Issue reported privately by Trevor Saunders.
---
src/server/index_marking.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/server/index_marking.c b/src/server/index_marking.c
index e317a20..1f66338 100644
--- a/src/server/index_marking.c
+++ b/src/server/index_marking.c
@@ -98,16 +98,15 @@ void insert_index_marks(TSpeechDMessage * msg, SPDDataMode
ssml_mode)
|| (u_char == '&')) {
g_string_append_printf(marked_text,
"%s" SD_MARK_HEAD "%d"
- SD_MARK_TAIL "%s",
- character, n,
- character2);
+ SD_MARK_TAIL,
+ character, n);
n++;
MSG2(6, "index_marking", "MSG altering 2: |%s|",
marked_text->str);
+ continue;
} else {
g_string_append_printf(marked_text, "%s",
character);
- // pos =
g_utf8_find_prev_char(pos, NULL);
MSG2(6, "index_marking", "MSG altering 3: |%s|",
marked_text->str);
continue;
--
1.7.3.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Fix SSML escaping while inserting index marks.,
Christopher Brannon <=