reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit ffce6ed347d5261eeac7dbeb3817afcfc2be118d
parent 1164e2249c793fb3194da2ea46115162bff8f51f
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Sun, 21 Aug 2016 22:53:46 -0400

about: escape quotes when setting the browser filter

Diffstat:
Msrc/about.cpp | 13++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/about.cpp b/src/about.cpp @@ -34,6 +34,8 @@ #include "transaction.hpp" #include <boost/algorithm/string/replace.hpp> +#include <iomanip> +#include <sstream> using namespace std; @@ -394,14 +396,11 @@ void AboutIndexDelegate::findInBrowser() return; const Package *pkg = currentPackage(); + const string &name = pkg->displayName(m_reapack->config()->browser.showDescs); - string filter = "\""; - filter += pkg->displayName(m_reapack->config()->browser.showDescs); - filter += "\" \""; - filter += m_index->name(); - filter += '"'; - - browser->setFilter(filter); + ostringstream stream; + stream << quoted(name) << ' ' << quoted(m_index->name()); + browser->setFilter(stream.str()); } void AboutIndexDelegate::aboutPackage()