mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fix File::GetDisplayName() not escaping special chars
When display_ is an empty string, GetDisplayName() returns name_, but name_'s value might contain Markdown special characters, and GetDisplayName() is supposed to return a Markdown string, though this was poorly documented.
This commit is contained in:
@@ -47,7 +47,8 @@ public:
|
||||
* @param name
|
||||
* The filename of the file.
|
||||
* @param display
|
||||
* The name to be displayed for the file in messages.
|
||||
* The name to be displayed for the file in messages, formatted using
|
||||
* GitHub Flavored Markdown.
|
||||
* @param condition
|
||||
* The File's condition string.
|
||||
* @return A File object.
|
||||
@@ -77,7 +78,12 @@ public:
|
||||
|
||||
/**
|
||||
* Get the display name of the file.
|
||||
* @return The file's display name.
|
||||
*
|
||||
* If the File was constructed with an empty display string, the name field
|
||||
* will be returned instead, with any `ASCII punctuation characters
|
||||
* <https://github.github.com/gfm/#ascii-punctuation-character>`_ escaped.
|
||||
* Escaping is not performed if returning the value of the display string.
|
||||
* @return The file's display name or filename.
|
||||
*/
|
||||
LOOT_API std::string GetDisplayName() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user