Index: /code/branches/core2/src/orxonox/core/CommandExecutor.cc
===================================================================
--- /code/branches/core2/src/orxonox/core/CommandExecutor.cc	(revision 1048)
+++ /code/branches/core2/src/orxonox/core/CommandExecutor.cc	(revision 1049)
@@ -335,5 +335,5 @@
     bool CommandExecutor::execute(const std::string& command)
     {
-        std::string strippedCommand = getStrippedEnclosingQuotes(command);
+        std::string strippedCommand = stripEnclosingQuotes(command);
 
         SubString tokensIO(strippedCommand, " ", SubString::WhiteSpaces, false, '\\', false, '"', false, '(', ')', false, '\0');
Index: /code/branches/core2/src/orxonox/core/ConfigFileManager.cc
===================================================================
--- /code/branches/core2/src/orxonox/core/ConfigFileManager.cc	(revision 1048)
+++ /code/branches/core2/src/orxonox/core/ConfigFileManager.cc	(revision 1049)
@@ -66,4 +66,21 @@
     // ConfigFileEntryValue //
     //////////////////////////
+
+    void ConfigFileEntryValue::setValue(const std::string& value)
+    {
+        if (!this->bString_)
+            this->value_ = value;
+        else
+            this->value_ = "\"" + addSlashes(value) + "\"";
+    }
+
+    std::string ConfigFileEntryValue::getValue() const
+    {
+        if (!this->bString_)
+            return this->value_;
+        else
+            return removeSlashes(stripEnclosingQuotes(this->value_));
+    }
+
     std::string ConfigFileEntryValue::getFileEntry() const
     {
@@ -130,27 +147,37 @@
     }
 
-    std::list<ConfigFileEntry*>::iterator ConfigFileSection::getEntryIterator(const std::string& name, const std::string& fallback)
+    std::list<ConfigFileEntry*>::iterator ConfigFileSection::getEntryIterator(const std::string& name, const std::string& fallback, bool bString)
     {
         for (std::list<ConfigFileEntry*>::iterator it = this->entries_.begin(); it != this->entries_.end(); ++it)
+        {
             if ((*it)->getName() == name)
+            {
+                (*it)->setString(bString);
                 return it;
+            }
+        }
 
         this->bUpdated_ = true;
 
-        return this->entries_.insert(this->entries_.end(), (ConfigFileEntry*)(new ConfigFileEntryValue(name, fallback)));
-    }
-
-    std::list<ConfigFileEntry*>::iterator ConfigFileSection::getEntryIterator(const std::string& name, unsigned int index, const std::string& fallback)
+        return this->entries_.insert(this->entries_.end(), (ConfigFileEntry*)(new ConfigFileEntryValue(name, fallback, bString)));
+    }
+
+    std::list<ConfigFileEntry*>::iterator ConfigFileSection::getEntryIterator(const std::string& name, unsigned int index, const std::string& fallback, bool bString)
     {
         for (std::list<ConfigFileEntry*>::iterator it = this->entries_.begin(); it != this->entries_.end(); ++it)
+        {
             if (((*it)->getName() == name) && ((*it)->getIndex() == index))
+            {
+                (*it)->setString(bString);
                 return it;
+            }
+        }
 
         this->bUpdated_ = true;
 
         if (index == 0)
-            return this->entries_.insert(this->entries_.end(), (ConfigFileEntry*)(new ConfigFileEntryVectorValue(name, index, fallback)));
-        else
-            return this->entries_.insert(++this->getEntryIterator(name, index - 1), (ConfigFileEntry*)(new ConfigFileEntryVectorValue(name, index, fallback)));
+            return this->entries_.insert(this->entries_.end(), (ConfigFileEntry*)(new ConfigFileEntryVectorValue(name, index, fallback, bString)));
+        else
+            return this->entries_.insert(++this->getEntryIterator(name, index - 1, "", bString), (ConfigFileEntry*)(new ConfigFileEntryVectorValue(name, index, fallback, bString)));
     }
 
@@ -233,21 +260,18 @@
                         unsigned int pos2 = line.find('[');
                         unsigned int pos3 = line.find(']');
-
-                        std::string value = removeTrailingWhitespaces(line.substr(pos1 + 1));
-                        std::string comment = "";
-
-                        std::string betweenQuotes = getStringBetweenQuotes(value);
-                        if (value.size() > 0 && value[0] == '"' && betweenQuotes != "" && betweenQuotes.size() > 0)
+                        unsigned int commentposition = getNextCommentPosition(line, pos1 + 1);
+                        while (isBetweenQuotes(line, commentposition))
                         {
-                            value = betweenQuotes;
-                            if (line.size() > pos1 + 1 + betweenQuotes.size() + 2)
-                                comment = removeTrailingWhitespaces(getComment(line.substr(pos1 + 1 + betweenQuotes.size() + 2)));
+                            commentposition = getNextCommentPosition(line, commentposition + 1);
+                        }
+                        std::string value = "", comment = "";
+                        if (commentposition == std::string::npos)
+                        {
+                            value = removeTrailingWhitespaces(line.substr(pos1 + 1));
                         }
                         else
                         {
-                            unsigned int pos4 = getCommentPosition(line);
-                            value = removeTrailingWhitespaces(line.substr(pos1 + 1, pos4 - pos1 - 1));
-                            if (pos4 != std::string::npos)
-                                comment = removeTrailingWhitespaces(line.substr(pos4));
+                            value = removeTrailingWhitespaces(line.substr(pos1 + 1, commentposition - pos1 - 1));
+                            comment = removeTrailingWhitespaces(line.substr(commentposition));
                         }
 
@@ -259,5 +283,5 @@
                             {
                                 // New array
-                                std::list<ConfigFileEntry*>::iterator it = newsection->getEntryIterator(getStripped(line.substr(0, pos2)), index, value);
+                                std::list<ConfigFileEntry*>::iterator it = newsection->getEntryIterator(getStripped(line.substr(0, pos2)), index, value, false);
                                 (*it)->setValue(value);
                                 (*it)->setComment(comment);
@@ -267,5 +291,5 @@
 
                         // New value
-                        newsection->getEntries().insert(newsection->getEntries().end(), new ConfigFileEntryValue(getStripped(line.substr(0, pos1)), value, comment));
+                        newsection->getEntries().insert(newsection->getEntries().end(), new ConfigFileEntryValue(getStripped(line.substr(0, pos1)), value, false, comment));
                         continue;
                     }
Index: /code/branches/core2/src/orxonox/core/ConfigFileManager.h
===================================================================
--- /code/branches/core2/src/orxonox/core/ConfigFileManager.h	(revision 1048)
+++ /code/branches/core2/src/orxonox/core/ConfigFileManager.h	(revision 1049)
@@ -63,8 +63,9 @@
         public:
             virtual void setValue(const std::string& value) = 0;
-            virtual const std::string& getValue() const = 0;
+            virtual std::string getValue() const = 0;
             virtual const std::string& getName() const = 0;
             virtual void setComment(const std::string& comment) = 0;
             virtual unsigned int getIndex() const { return 0; }
+            virtual void setString(bool bString) = 0;
             virtual std::string getFileEntry() const = 0;
     };
@@ -77,5 +78,5 @@
     {
         public:
-            inline ConfigFileEntryValue(const std::string& name, const std::string& value = "", const std::string& additionalComment = "") : name_(name), value_(value), additionalComment_(additionalComment), bString_(false) {}
+            inline ConfigFileEntryValue(const std::string& name, const std::string& value = "", bool bString = false, const std::string& additionalComment = "") : name_(name), value_(value), bString_(bString), additionalComment_(additionalComment) {}
             inline virtual ~ConfigFileEntryValue() {}
 
@@ -86,8 +87,6 @@
                 { this->additionalComment_ = comment; }
 
-            inline virtual void setValue(const std::string& value)
-                { this->value_ = value; }
-            inline virtual const std::string& getValue() const
-                { return this->value_; }
+            virtual void setValue(const std::string& value);
+            virtual std::string getValue() const;
 
             inline bool isString() const
@@ -101,6 +100,6 @@
             std::string name_;
             std::string value_;
+            bool bString_;
             std::string additionalComment_;
-            bool bString_;
     };
 
@@ -112,5 +111,5 @@
     {
         public:
-            inline ConfigFileEntryVectorValue(const std::string& name, unsigned int index, const std::string& value = "", const std::string& additionalComment = "") : ConfigFileEntryValue(name, value, additionalComment), index_(index) {}
+            inline ConfigFileEntryVectorValue(const std::string& name, unsigned int index, const std::string& value = "", bool bString = false, const std::string& additionalComment = "") : ConfigFileEntryValue(name, value, bString, additionalComment), index_(index) {}
             inline virtual ~ConfigFileEntryVectorValue() {}
 
@@ -142,6 +141,8 @@
             inline virtual void setValue(const std::string& value)
                 {}
-            inline virtual const std::string& getValue() const
+            inline virtual std::string getValue() const
                 { return this->comment_; }
+
+            inline void setString(bool bString) {}
 
             inline virtual std::string getFileEntry() const
@@ -170,13 +171,13 @@
                 { this->additionalComment_ = comment; }
 
-            inline void setValue(const std::string& name, const std::string& value)
-                { this->getEntry(name, value)->setValue(value); }
-            inline const std::string& getValue(const std::string& name, const std::string& fallback)
-                { return this->getEntry(name, fallback)->getValue(); }
-
-            inline void setValue(const std::string& name, unsigned int index, const std::string& value)
-                { this->getEntry(name, index, value)->setValue(value); }
-            inline const std::string& getValue(const std::string& name, unsigned int index, const std::string& fallback)
-                { return this->getEntry(name, index, fallback)->getValue(); }
+            inline void setValue(const std::string& name, const std::string& value, bool bString)
+                { this->getEntry(name, value, bString)->setValue(value); }
+            inline std::string getValue(const std::string& name, const std::string& fallback, bool bString)
+                { return this->getEntry(name, fallback, bString)->getValue(); }
+
+            inline void setValue(const std::string& name, unsigned int index, const std::string& value, bool bString)
+                { this->getEntry(name, index, value, bString)->setValue(value); }
+            inline std::string getValue(const std::string& name, unsigned int index, const std::string& fallback, bool bString)
+                { return this->getEntry(name, index, fallback, bString)->getValue(); }
 
             void deleteVectorEntries(const std::string& name, unsigned int startindex = 0);
@@ -193,11 +194,11 @@
                 { return this->entries_.end(); }
 
-            std::list<ConfigFileEntry*>::iterator getEntryIterator(const std::string& name, const std::string& fallback = "");
-            std::list<ConfigFileEntry*>::iterator getEntryIterator(const std::string& name, unsigned int index, const std::string& fallback = "");
-
-            inline ConfigFileEntry* getEntry(const std::string& name, const std::string& fallback)
-                { return (*this->getEntryIterator(name, fallback)); }
-            inline ConfigFileEntry* getEntry(const std::string& name, unsigned int index, const std::string& fallback)
-                { return (*this->getEntryIterator(name, index, fallback)); }
+            std::list<ConfigFileEntry*>::iterator getEntryIterator(const std::string& name, const std::string& fallback, bool bString);
+            std::list<ConfigFileEntry*>::iterator getEntryIterator(const std::string& name, unsigned int index, const std::string& fallback, bool bString);
+
+            inline ConfigFileEntry* getEntry(const std::string& name, const std::string& fallback, bool bString)
+                { return (*this->getEntryIterator(name, fallback, bString)); }
+            inline ConfigFileEntry* getEntry(const std::string& name, unsigned int index, const std::string& fallback, bool bString)
+                { return (*this->getEntryIterator(name, index, fallback, bString)); }
 
             std::string name_;
@@ -221,13 +222,13 @@
             void clean(bool bCleanComments = false);
 
-            inline void setValue(const std::string& section, const std::string& name, const std::string& value)
-                { this->getSection(section)->setValue(name, value); this->save(); }
-            inline const std::string& getValue(const std::string& section, const std::string& name, const std::string& fallback)
-                { const std::string& output = this->getSection(section)->getValue(name, fallback); this->saveIfUpdated(); return output; }
-
-            inline void setValue(const std::string& section, const std::string& name, unsigned int index, const std::string& value)
-                { this->getSection(section)->setValue(name, index, value); this->save(); }
-            inline const std::string& getValue(const std::string& section, const std::string& name, unsigned int index, const std::string& fallback)
-                { const std::string& output = this->getSection(section)->getValue(name, index, fallback); this->saveIfUpdated(); return output; }
+            inline void setValue(const std::string& section, const std::string& name, const std::string& value, bool bString)
+                { this->getSection(section)->setValue(name, value, bString); this->save(); }
+            inline std::string getValue(const std::string& section, const std::string& name, const std::string& fallback, bool bString)
+                { std::string output = this->getSection(section)->getValue(name, fallback, bString); this->saveIfUpdated(); return output; }
+
+            inline void setValue(const std::string& section, const std::string& name, unsigned int index, const std::string& value, bool bString)
+                { this->getSection(section)->setValue(name, index, value, bString); this->save(); }
+            inline std::string getValue(const std::string& section, const std::string& name, unsigned int index, const std::string& fallback, bool bString)
+                { std::string output = this->getSection(section)->getValue(name, index, fallback, bString); this->saveIfUpdated(); return output; }
 
             inline void deleteVectorEntries(const std::string& section, const std::string& name, unsigned int startindex = 0)
@@ -264,13 +265,13 @@
             void clean(ConfigFileType type, bool bCleanComments = false);
 
-            inline void setValue(ConfigFileType type, const std::string& section, const std::string& name, const std::string& value)
-                { this->getFile(type)->setValue(section, name, value); }
-            inline const std::string& getValue(ConfigFileType type, const std::string& section, const std::string& name, const std::string& fallback)
-                { return this->getFile(type)->getValue(section, name, fallback); }
-
-            inline void setValue(ConfigFileType type, const std::string& section, const std::string& name, unsigned int index, const std::string& value)
-                { this->getFile(type)->setValue(section, name, index, value); }
-            inline const std::string& getValue(ConfigFileType type, const std::string& section, const std::string& name, unsigned int index, const std::string& fallback)
-                { return this->getFile(type)->getValue(section, name, index, fallback); }
+            inline void setValue(ConfigFileType type, const std::string& section, const std::string& name, const std::string& value, bool bString)
+                { this->getFile(type)->setValue(section, name, value, bString); }
+            inline std::string getValue(ConfigFileType type, const std::string& section, const std::string& name, const std::string& fallback, bool bString)
+                { return this->getFile(type)->getValue(section, name, fallback, bString); }
+
+            inline void setValue(ConfigFileType type, const std::string& section, const std::string& name, unsigned int index, const std::string& value, bool bString)
+                { this->getFile(type)->setValue(section, name, index, value, bString); }
+            inline std::string getValue(ConfigFileType type, const std::string& section, const std::string& name, unsigned int index, const std::string& fallback, bool bString)
+                { return this->getFile(type)->getValue(section, name, index, fallback, bString); }
 
             inline void deleteVectorEntries(ConfigFileType type, const std::string& section, const std::string& name, unsigned int startindex = 0)
Index: /code/branches/core2/src/orxonox/core/ConfigValueContainer.cc
===================================================================
--- /code/branches/core2/src/orxonox/core/ConfigValueContainer.cc	(revision 1048)
+++ /code/branches/core2/src/orxonox/core/ConfigValueContainer.cc	(revision 1049)
@@ -88,5 +88,5 @@
 
         for (unsigned int i = 0; i < defvalue.size(); i++)
-            ConfigFileManager::getSingleton()->getValue(this->type_, this->sectionname_, this->varname_, i, defvalue[i].toString());
+            ConfigFileManager::getSingleton()->getValue(this->type_, this->sectionname_, this->varname_, i, defvalue[i].toString(), this->value_.isA(MT_string));
 
         for (unsigned int i = 0; i < defvalue.size(); i++)
@@ -123,5 +123,5 @@
                 this->valueVector_.erase(this->valueVector_.begin() + index);
                 for (unsigned int i = index; i < this->valueVector_.size(); i++)
-                    ConfigFileManager::getSingleton()->setValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i]);
+                    ConfigFileManager::getSingleton()->setValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isA(MT_string));
                 ConfigFileManager::getSingleton()->deleteVectorEntries(this->type_, this->sectionname_, this->varname_, this->valueVector_.size());
 
@@ -171,5 +171,5 @@
 
         bool success = this->tset(input);
-        ConfigFileManager::getSingleton()->setValue(this->type_, this->sectionname_, this->varname_, input);
+        ConfigFileManager::getSingleton()->setValue(this->type_, this->sectionname_, this->varname_, input, this->value_.isA(MT_string));
         return success;
     }
@@ -186,5 +186,5 @@
         {
             bool success = this->tset(index, input);
-            ConfigFileManager::getSingleton()->setValue(this->type_, this->sectionname_, this->varname_, index, input);
+            ConfigFileManager::getSingleton()->setValue(this->type_, this->sectionname_, this->varname_, index, input, this->value_.isA(MT_string));
             return success;
         }
@@ -251,5 +251,5 @@
     {
         if (!this->bIsVector_)
-            this->value_.fromString(ConfigFileManager::getSingleton()->getValue(this->type_, this->sectionname_, this->varname_, this->defvalueString_));
+            this->value_.fromString(ConfigFileManager::getSingleton()->getValue(this->type_, this->sectionname_, this->varname_, this->defvalueString_, this->value_.isA(MT_string)));
         else
         {
@@ -257,5 +257,5 @@
             for (unsigned int i = 0; i < ConfigFileManager::getSingleton()->getVectorSize(this->type_, this->sectionname_, this->varname_); i++)
             {
-                this->value_.fromString(ConfigFileManager::getSingleton()->getValue(this->type_, this->sectionname_, this->varname_, i, this->defvalueStringVector_[i]));
+                this->value_.fromString(ConfigFileManager::getSingleton()->getValue(this->type_, this->sectionname_, this->varname_, i, this->defvalueStringVector_[i], this->value_.isA(MT_string)));
                 this->valueVector_.push_back(this->value_);
             }
@@ -322,5 +322,5 @@
                 {
                     this->valueVector_.push_back(MultiTypeMath());
-                    ConfigFileManager::getSingleton()->setValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i]);
+                    ConfigFileManager::getSingleton()->setValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isA(MT_string));
                 }
             }
Index: /code/branches/core2/src/orxonox/core/InputBuffer.cc
===================================================================
--- /code/branches/core2/src/orxonox/core/InputBuffer.cc	(revision 1048)
+++ /code/branches/core2/src/orxonox/core/InputBuffer.cc	(revision 1049)
@@ -36,5 +36,5 @@
     {
         this->bActivated_ = false;
-        this->allowedChars_ = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZäöüÄÖÜ0123456789 \"().:,;_-+*/=!?<>[|]";
+        this->allowedChars_ = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZäöüÄÖÜ0123456789 \\\"().:,;_-+*/=!?<>[|]";
         this->keyboard_ = keyboard;
         this->buffer_ = "";
Index: /code/branches/core2/src/orxonox/objects/test3.cc
===================================================================
--- /code/branches/core2/src/orxonox/objects/test3.cc	(revision 1048)
+++ /code/branches/core2/src/orxonox/objects/test3.cc	(revision 1049)
@@ -84,5 +84,5 @@
         std::cout << "vector<int>:     " << i << ": " << this->vector_int_[i] << std::endl;
         for (unsigned int i = 0; i < this->vector_string_.size(); i++)
-        std::cout << "vector<string>:  " << i << ": " << this->vector_string_[i] << std::endl;
+        std::cout << "vector<string>:  " << i << ":>" << this->vector_string_[i] << "<" << std::endl;
         for (unsigned int i = 0; i < this->vector_vector3_.size(); i++)
         std::cout << "vector<vector3>: " << i << ": " << this->vector_vector3_[i] << std::endl;
Index: /code/branches/core2/src/util/String.cc
===================================================================
--- /code/branches/core2/src/util/String.cc	(revision 1048)
+++ /code/branches/core2/src/util/String.cc	(revision 1049)
@@ -27,5 +27,5 @@
 
 #include <cctype>
-
+#include <iostream>
 #include "String.h"
 
@@ -92,4 +92,28 @@
 
     return quote;
+}
+
+/**
+    @brief Returns true if pos is between two quotes.
+    @param str The string
+    @param pos The position to check
+    @return True if pos is between two quotes
+*/
+bool isBetweenQuotes(const std::string& str, unsigned int pos)
+{
+    if (pos == std::string::npos)
+        return false;
+
+    unsigned int quotecount = 0;
+    unsigned int quote = 0;
+    while ((quote = getNextQuote(str, quote)) < pos)
+    {
+        quotecount++;
+    }
+
+    if (quote == std::string::npos)
+        return false;
+
+    return ((quotecount % 2) == 1);
 }
 
@@ -124,13 +148,14 @@
     @brief Removes enclosing quotes if available.
     @brief str The string to strip
-*/
-void stripEnclosingQuotes(std::string* str)
+    @return The string with removed quotes
+*/
+std::string stripEnclosingQuotes(const std::string& str)
 {
     unsigned int start = std::string::npos;
     unsigned int end = 0;
 
-    for (unsigned int pos = 0; (pos < (*str).size()) && (pos < std::string::npos); pos++)
-    {
-        if ((*str)[pos] == '"')
+    for (unsigned int pos = 0; (pos < str.size()) && (pos < std::string::npos); pos++)
+    {
+        if (str[pos] == '"')
         {
             start = pos;
@@ -138,11 +163,11 @@
         }
 
-        if (((*str)[pos] != ' ') && ((*str)[pos] != '\t') && ((*str)[pos] != '\n'))
-            return;
-    }
-
-    for (unsigned int pos = (*str).size() - 1; pos < std::string::npos; pos--)
-    {
-        if ((*str)[pos] == '"')
+        if ((str[pos] != ' ') && (str[pos] != '\t') && (str[pos] != '\n'))
+            return str;
+    }
+
+    for (unsigned int pos = str.size() - 1; pos < std::string::npos; pos--)
+    {
+        if (str[pos] == '"')
         {
             end = pos;
@@ -150,22 +175,12 @@
         }
 
-        if (((*str)[pos] != ' ') && ((*str)[pos] != '\t') && ((*str)[pos] != '\n'))
-            return;
+        if ((str[pos] != ' ') && (str[pos] != '\t') && (str[pos] != '\n'))
+            return str;
     }
 
     if ((start != std::string::npos) && (end != 0))
-        (*str) = (*str).substr(start + 1, end - start - 1);
-}
-
-/**
-    @brief Returns a copy of the string with removed enclosing quotes (if available).
-    @brief str The string to strip
-    @return The striped copy of the string
-*/
-std::string getStrippedEnclosingQuotes(const std::string& str)
-{
-    std::string output = std::string(str);
-    stripEnclosingQuotes(&output);
-    return output;
+        return str.substr(start + 1, end - start - 1);
+    else
+        return str;
 }
 
@@ -235,4 +250,51 @@
 }
 
+std::string addSlashes(const std::string& str)
+{
+    std::string output = str;
+
+    for (unsigned int pos = 0; (pos = output.find('\\', pos)) < std::string::npos; pos += 2) { output.replace(pos, 2, "\\\\"); }
+    for (unsigned int pos = 0; (pos = output.find('\n', pos)) < std::string::npos; pos += 2) { output.replace(pos, 2, "\\n"); }
+    for (unsigned int pos = 0; (pos = output.find('\t', pos)) < std::string::npos; pos += 2) { output.replace(pos, 2, "\\t"); }
+    for (unsigned int pos = 0; (pos = output.find('\v', pos)) < std::string::npos; pos += 2) { output.replace(pos, 2, "\\v"); }
+    for (unsigned int pos = 0; (pos = output.find('\b', pos)) < std::string::npos; pos += 2) { output.replace(pos, 2, "\\b"); }
+    for (unsigned int pos = 0; (pos = output.find('\r', pos)) < std::string::npos; pos += 2) { output.replace(pos, 2, "\\r"); }
+    for (unsigned int pos = 0; (pos = output.find('\f', pos)) < std::string::npos; pos += 2) { output.replace(pos, 2, "\\f"); }
+    for (unsigned int pos = 0; (pos = output.find('\a', pos)) < std::string::npos; pos += 2) { output.replace(pos, 2, "\\a"); }
+    for (unsigned int pos = 0; (pos = output.find('"', pos)) < std::string::npos; pos += 2) { output.replace(pos, 2, "\\\""); }
+    for (unsigned int pos = 0; (pos = output.find('\0', pos)) < std::string::npos; pos += 2) { output.replace(pos, 2, "\\0"); }
+
+    return output;
+}
+
+std::string removeSlashes(const std::string& str)
+{
+    if (str.size() == 0)
+        return str;
+
+    std::string output = "";
+    for (unsigned int pos = 0; pos < str.size() - 1; )
+    {
+        if (str[pos] == '\\')
+        {
+            if (str[pos + 1] == '\\') { output += '\\'; pos += 2; continue; }
+            else if (str[pos + 1] == 'n') { output += '\n'; pos += 2; continue; }
+            else if (str[pos + 1] == 't') { output += '\t'; pos += 2; continue; }
+            else if (str[pos + 1] == 'v') { output += '\v'; pos += 2; continue; }
+            else if (str[pos + 1] == 'b') { output += '\b'; pos += 2; continue; }
+            else if (str[pos + 1] == 'r') { output += '\r'; pos += 2; continue; }
+            else if (str[pos + 1] == 'f') { output += '\f'; pos += 2; continue; }
+            else if (str[pos + 1] == 'a') { output += '\a'; pos += 2; continue; }
+            else if (str[pos + 1] == '"') { output += '"'; pos += 2; continue; }
+            else if (str[pos + 1] == '0') { output += '\0'; pos += 2; continue; }
+        }
+        output += str[pos];
+        pos++;
+    }
+    output += str[str.size() - 1];
+
+    return output;
+}
+
 /**
     @brief Replaces each char between A and Z with its lowercase equivalent.
@@ -364,5 +426,16 @@
 unsigned int getCommentPosition(const std::string& str)
 {
-    for (unsigned int i = 0; i < str.size(); i++)
+    return getNextCommentPosition(str, 0);
+}
+
+/**
+    @brief Returns the position of the next comment-symbol, starting with start.
+    @param str The string
+    @param start The startposition
+    @return The position
+*/
+unsigned int getNextCommentPosition(const std::string& str, unsigned int start)
+{
+    for (unsigned int i = start; i < str.size(); i++)
         if (isComment(str.substr(i)))
             return i;
Index: /code/branches/core2/src/util/String.h
===================================================================
--- /code/branches/core2/src/util/String.h	(revision 1048)
+++ /code/branches/core2/src/util/String.h	(revision 1049)
@@ -40,14 +40,17 @@
 
 _UtilExport unsigned int getNextQuote(const std::string& str, unsigned int start);
+_UtilExport bool         isBetweenQuotes(const std::string& str, unsigned int pos);
 
 _UtilExport bool         hasStringBetweenQuotes(const std::string& str);
 _UtilExport std::string  getStringBetweenQuotes(const std::string& str);
 
-_UtilExport void         stripEnclosingQuotes(std::string* str);
-_UtilExport std::string  getStrippedEnclosingQuotes(const std::string& str);
+_UtilExport std::string  stripEnclosingQuotes(const std::string& str);
 
 _UtilExport bool         isEmpty(const std::string& str);
 _UtilExport bool         isComment(const std::string& str);
 _UtilExport bool         isNumeric(const std::string& str);
+
+_UtilExport std::string  addSlashes(const std::string& str);
+_UtilExport std::string  removeSlashes(const std::string& str);
 
 _UtilExport void         lowercase(std::string* str);
@@ -63,4 +66,5 @@
 _UtilExport std::string  getComment(const std::string& str);
 _UtilExport unsigned int getCommentPosition(const std::string& str);
+_UtilExport unsigned int getNextCommentPosition(const std::string& str, unsigned int start = 0);
 
 //! The Convert class has some static member functions to convert strings to values and values to strings.
