Skip to content

Commit 8ff31b8

Browse files
committed
fixed extra whitespaces
1 parent d7960da commit 8ff31b8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

chatbot/core/aiml/parse_aiml_as_XML.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ function parse_aiml_as_XML($convoArr)
3434
$botsay = trim(implode_recursive(' ', $responseArray, __FILE__, __FUNCTION__, __LINE__));
3535
$botsay = str_replace(' .', '.', $botsay);
3636
$botsay = str_replace(' ', ' ', $botsay);
37+
$botsay = str_replace(' ?', '?', $botsay);
38+
$botsay = str_replace(' ,', ',', $botsay);
39+
$botsay = str_replace(' s ', 's ', $botsay);
3740
$convoArr['aiml']['parsed_template'] = $botsay;
3841
runDebug(__FILE__, __FUNCTION__, __LINE__, "Completed parsing the template. The bot will say: $botsay", 4);
3942
return $convoArr;

0 commit comments

Comments
 (0)