diff --git a/src/project.cpp b/src/project.cpp index 4829272..18bee73 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -734,7 +734,7 @@ void Project::LanguageProtocol::show_symbols() { if(container == "null") container.clear(); - auto row = filesystem::get_relative_path(location.file, *project_path).string() + ':' + std::to_string(location.range.start.line + 1) + ": " + (!container.empty() ? container + "::" : "") + "" + it->second.get("name") + ""; + auto row = filesystem::get_relative_path(location.file, *project_path).string() + ':' + std::to_string(location.range.start.line + 1) + ": " + (!container.empty() ? Glib::Markup::escape_text(container) + "::" : "") + "" + Glib::Markup::escape_text(it->second.get("name")) + ""; locations->emplace_back(std::make_pair(std::move(location), std::move(row))); } @@ -777,7 +777,7 @@ void Project::LanguageProtocol::show_symbols() { if(!container.empty()) prefix = container + "::"; } - auto row = std::to_string(location->range.start.line + 1) + ": " + prefix + "" + it->second.get("name") + ""; + auto row = std::to_string(location->range.start.line + 1) + ": " + Glib::Markup::escape_text(prefix) + "" + Glib::Markup::escape_text(it->second.get("name")) + ""; locations->emplace_back(std::make_pair(std::move(*location), std::move(row))); auto children = it->second.get_child_optional("children"); if(children) diff --git a/src/source_language_protocol.cpp b/src/source_language_protocol.cpp index c4006cb..65a48c2 100644 --- a/src/source_language_protocol.cpp +++ b/src/source_language_protocol.cpp @@ -875,7 +875,7 @@ void Source::LanguageProtocolView::setup_navigation_and_refactoring() { if(!container.empty()) prefix = container + "::"; } - methods.emplace_back(Offset(range->start.line, range->start.character), std::to_string(range->start.line + 1) + ": " + prefix + "" + it->second.get("name") + ""); + methods.emplace_back(Offset(range->start.line, range->start.character), std::to_string(range->start.line + 1) + ": " + Glib::Markup::escape_text(prefix) + "" + Glib::Markup::escape_text(it->second.get("name")) + ""); } auto children = it->second.get_child_optional("children"); if(children)