Duplicating node ensures when a UPROPERTY comment contains escaped quote followed by a pipe

Summary

Duplicating a “Make Struct” node ensures when a UPROPERTY comment contains an escaped quote followed by a pipe.

What Type of Bug are you experiencing?

Editor

Steps to Reproduce

  1. In a C++ project, add:
USTRUCT(BlueprintType)
struct FMyObject {
	GENERATED_BODY()

	//"foo|bar"
	UPROPERTY(BlueprintReadWrite)
	int MyInt = 42;

	UPROPERTY(BlueprintReadWrite)
	bool MyBool = true;
};
  1. In a Blueprint graph, place a “Make My Object” node (Utilities > Struct > Make My Object).
  2. Duplicate it (Ctrl+D, or Ctrl+C / Ctrl+V).

Expected Result

The node duplicates normally with all pins intact.

Observed Result

ensure(ThisPin) fires in PostProcessPastedNodePinLinks. The duplicated node is missing the MyInt pin (see image).

Console output:

Warning: While importing text for property 'ShowPinForProperties' in 'K2Node_MakeStruct':
Warning: ImportText(ShowPinForProperties): Not enough closing parenthesis in: (PropertyName="MyInt",PropertyFriendlyName="My Int",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "MyObject:MyInt", "\"foo
LogProperty: Warning: ReadToken: Bad quoted string: "My Int\nInteger\n\n\"foo
Warning: MyInt: Parse error while importing property values (PinName = MyInt).
LogOutputDevice: Warning: Script Stack (0 frames) :
LogOutputDevice: Error: Ensure condition failed: ThisPin [File:C:\Users\Sven\UnrealEngine\Engine\Source\Editor\UnrealEd\Private\EdGraphUtilities.cpp] [Line: 63] 
LogStats:             FDebug::EnsureFailed -  0.001 s
EnsureFailed: Error: Ensure condition failed: ThisPin [File:C:\Users\Sven\UnrealEngine\Engine\Source\Editor\UnrealEd\Private\EdGraphUtilities.cpp] [Line: 63] 

Affects Versions

5.8

Platform(s)

Windows

Upload an image

Additional Notes

Root cause: FCustomizableTextObjectFactory::ProcessBuffer (EditorFactories.cpp) reads the clipboard buffer line by line with FParse::Line. FParse::Line does not skip escaped quotes (\"), so bIsQuoted flips to false mid-string; the following | then breaks the line early via its command-chaining behavior. FParse::LineExtended already handles escaped quotes correctly.

Suggested fix: have ProcessBuffer use FParse::LineExtended with OldDefaultMode, which preserves the old bExact == false behavior for everything except the escaped-quote handling. PR: [PR link]

Workaround: drop the pipe or the escaped quote from the comment, or set the tooltip explicitly via UPROPERTY(meta=(ToolTip=“…”)) so UHT doesn’t derive it from the raw comment.

Pull request: https://github.com/EpicGames/UnrealEngine/pull/15020
Full write-up: GitHub - Sven-vh/UE-Comment-Bug: Investigation into an Unreal Engine bug caused by comments · GitHub