diff --git a/ChangeLog b/ChangeLog index b74e3532b..f7e22b26c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,8 @@ confused a subsequent import (thanks to John Florian). + Fixed bug #241 that caused redirected output to retain color control codes for colored header and footnotes (thanks to John Florian). + + Fixed bug #248 where single and double quotes are both stored as + ampersand-quot-semi (thanks to John Florian). ------ old releases ------------------------------ diff --git a/src/Att.cpp b/src/Att.cpp index 6aa09a556..608252c18 100644 --- a/src/Att.cpp +++ b/src/Att.cpp @@ -711,8 +711,11 @@ void Att::encode (std::string& value) const while ((i = value.find ('\t')) != std::string::npos) value.replace (i, 1, "&tab;"); // no i18n + while ((i = value.find ('\'')) != std::string::npos) + value.replace (i, 1, "&squot;"); // no i18n + while ((i = value.find ('"')) != std::string::npos) - value.replace (i, 1, """); // no i18n + value.replace (i, 1, "&dquot;"); // no i18n while ((i = value.find (',')) != std::string::npos) value.replace (i, 1, ","); // no i18n @@ -730,7 +733,8 @@ void Att::encode (std::string& value) const //////////////////////////////////////////////////////////////////////////////// // Decode values after parse. // \t <- &tab; -// " <- " +// " <- " or &dquot; +// ' <- &squot; // , <- , // [ <- &open; // ] <- &close; @@ -742,6 +746,12 @@ void Att::decode (std::string& value) const while ((i = value.find ("&tab;")) != std::string::npos) // no i18n value.replace (i, 5, "\t"); + while ((i = value.find ("&dquot;")) != std::string::npos) // no i18n + value.replace (i, 7, "\""); + + while ((i = value.find ("&squot;")) != std::string::npos) // no i18n + value.replace (i, 7, "'"); + while ((i = value.find (""")) != std::string::npos) // no i18n value.replace (i, 6, "\"");