U4-6655 - RTE Macro not rendering in backoffice when "macroAlias" is not first attribute

Created by Tom Fulton 23 May 2015, 02:37:13 Updated by Shannon Deminick 26 May 2015, 00:00:07

What did you do?

  • Upgraded a v6 site
  • Visited a page in the Umbraco backoffice with an RTE and an inserted macro, where macroAlias is not the first attribute in the tag, ex:
<?UMBRACO_MACRO test="test1" macroAlias="SomeMacro" /?>

What did you expect to happen?

  • Umbraco should detect this as a macro and render the placeholder around it in the RTE

What actually happened?

  • The macro is not shown in the RTE at all, and commented out in the source (not being parsed). See attached screenshot.


  • Works fine when macroAlias is the first attribute in the UMBRACO_MACRO tag
  • Still renders fine in the front-end, even though it doesn't show in the backoffice

Pull request details: The issue was two regular expressions that were always expecting "<?UMBRACO_MACRO macroAlias=". I updated these regular expressions to allow for optional text before macroAlias starts, and made a non-capturing group as not to affect any existing logic. Also added tests for each.


1 Attachments


Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal

Category: Editor

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.2.5

Due in version: 7.2.6


Story Points: