Total RP 3

Total RP 3

4M Downloads

Serialization : ~ appears after export/import as ~|

Solanya opened this issue ยท 1 comments

commented

Title. When a ~ is somewhere in a profile, upon exporting then importing the profile, it appears as ~| (although already having ~| seems not to add another pipe).

This issue already popped up earlier in Extended (as a ~= condition was changed to ~|= upon export/import, breaking the condition). Managed to track down the commit that solved it at the time for creations : Total-RP/Total-RP-3-Extended@df64316

Might be something to look at directly in the deserialize function ?

commented

Technical notes:
The ~character is used as a special delimiter by the serializer, that's why a ~ in a serialized text is escaped as ~| .
The actual issue here is that the | character is a special character for texts in WoW. When pasting/entering text inside an editbox, to avoid interpreting the | the UI actually escape the character automatically, making it || when doing a :GetText(). The issue is not in the serialization functions itself but instead it should be handled when setting or getting text from the UI (like it is done in Kaji's commit).