mirror of
https://github.com/clangen/musikcube.git
synced 2024-12-29 18:14:16 +00:00
Escape the & character
This commit is contained in:
parent
0669fd25f1
commit
516f3b2c28
@ -42,6 +42,8 @@
|
||||
|
||||
#include <pch.hpp>
|
||||
|
||||
#include <win32cpp/Utility.hpp>
|
||||
|
||||
#include <cube/MetadataFilterModel.hpp>
|
||||
#include <cube/MetadataFilterController.hpp>
|
||||
#include <cube/BrowseController.hpp>
|
||||
@ -61,7 +63,7 @@ uistring MetadataFilterModel::CellValueToString(int rowIndex, ListView::Colum
|
||||
{
|
||||
typedef boost::basic_format<uichar> format;
|
||||
if(rowIndex<this->metadata.size()){
|
||||
return this->metadata[rowIndex]->value;
|
||||
return win32cpp::Escape(this->metadata[rowIndex]->value);
|
||||
}else{
|
||||
return uistring();
|
||||
}
|
||||
|
@ -42,6 +42,8 @@
|
||||
|
||||
#include <pch.hpp>
|
||||
|
||||
#include <win32cpp/Utility.hpp>
|
||||
|
||||
#include <core/LibraryFactory.h>
|
||||
#include <core/PlaybackQueue.h>
|
||||
|
||||
@ -85,7 +87,7 @@ uistring TracklistModel::CellValueToString(int rowIndex, ColumnRef co
|
||||
}else{
|
||||
const utfchar *value = track->GetValue(tracklistColumn->metaKey.c_str());
|
||||
if(value)
|
||||
return value;
|
||||
return win32cpp::Escape(value);
|
||||
|
||||
return _T("");
|
||||
}
|
||||
|
@ -38,13 +38,19 @@
|
||||
|
||||
#include <pch.hpp>
|
||||
#include <win32cpp/Utility.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace win32cpp {
|
||||
using namespace win32cpp;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
uistring win32cpp::Escape(uistring string){
|
||||
boost::algorithm::replace_all(string,_T("&"),_T("&&"));
|
||||
return string;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
} // namespace win32cpp
|
||||
|
||||
|
@ -38,12 +38,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <win32cpp/Types.hpp>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace win32cpp {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
uistring Escape(uistring string);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
} // win32cpp
|
Loading…
Reference in New Issue
Block a user