View Issue Details

IDProjectCategoryView StatusLast Update
0006467DarkRadiantMap Editingpublic27.01.2024 06:11
Reportergreebo Assigned Togreebo  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.8.0 
Target Version3.9.0Fixed in Version3.9.0 
Summary0006467: Support saving entity key/value pairs containing double quotes
DescriptionThe map parser can deal with double quotes in a .map file as long as they are escaped, but DarkRadiant will not escape double quotes when writing the quotes to a .map file.
Steps To ReproduceThis is a .map file with an escaped double-quote in the keyvalue:

Version 2
// entity 0
{
"classname" "light"
"name" "light"
"origin" "0.160161 72.1389 24.7429"
"test" "Test \"Blacky\" test"
}

Load this map and save it again, it will be converted to this:

Version 2
// entity 0
{
"classname" "light"
"name" "light"
"origin" "0.160161 72.1389 24.7429"
"test" "Test "Blacky" test"
}
Additional InformationAffected code is in Doom3MapWriter::writeEntityKeyValues:

// Export the entity key values
entity->getEntity().forEachKeyValue([&](const std::string& key, const std::string& value)
{
    stream << "\"" << key << "\" \"" << escapeLineBreaks(value) << "\"" << std::endl;
});
TagsNo tags attached.

Relationships

related to 0006265 resolvedgreebo Objective Description flumoxed by double-quotes 

Activities

There are no notes attached to this issue.

Related Changesets

DarkRadiant: master 2319e6e4

27.01.2024 05:36

greebo


Details Diff
0006467: Add unit test checking serialising/deserialising entity key values with double quotes. Deduplicate file loading code. Affected Issues
0006467
mod - test/Brush.cpp Diff File
mod - test/MapExport.cpp Diff File
mod - test/MapSavingLoading.cpp Diff File
mod - test/Settings.cpp Diff File
mod - test/algorithm/FileUtils.h Diff File
mod - test/algorithm/XmlUtils.h Diff File

DarkRadiant: master 8345fb0e

27.01.2024 05:39

greebo


Details Diff
0006467: Escape quotes and line breaks when writing entity key values. Affected Issues
0006467
mod - radiantcore/map/format/Doom3MapWriter.cpp Diff File

DarkRadiant: master d6fc7f8a

27.01.2024 05:47

greebo


Details Diff
0006467: Update google test adapter package reference Affected Issues
0006467
mod - tools/msvc/Tests/Tests.vcxproj Diff File
mod - tools/msvc/Tests/packages.config Diff File

Issue History

Date Modified Username Field Change
26.01.2024 15:53 greebo New Issue
26.01.2024 15:54 greebo Status new => confirmed
26.01.2024 15:54 greebo Summary Support saving and loading entity key/value pairs containing double quotes => Support saving entity key/value pairs containing double quotes
26.01.2024 15:55 greebo Steps to Reproduce Updated
26.01.2024 15:58 greebo Additional Information Updated
26.01.2024 15:59 greebo Relationship added related to 0006265
27.01.2024 05:39 greebo Changeset attached => DarkRadiant master 2319e6e4
27.01.2024 05:39 greebo Changeset attached => DarkRadiant master 8345fb0e
27.01.2024 05:41 greebo Assigned To => greebo
27.01.2024 05:41 greebo Status confirmed => assigned
27.01.2024 05:41 greebo Target Version => 3.9.0
27.01.2024 05:41 greebo Status assigned => resolved
27.01.2024 05:41 greebo Resolution open => fixed
27.01.2024 05:41 greebo Fixed in Version => 3.9.0
27.01.2024 06:11 greebo Changeset attached => DarkRadiant master d6fc7f8a