Skip to content

"Toggle Render Mode" deletes attributes in second IMG tag #15

Open
@sabre23t

Description

@sabre23t

If you have the following HTML in a Concord Example 1 v0.5.3 headline:
<img src="img_girl.jpg" width="500"><img src="img_girl2.jpg" width="500">

When you go into Concord render mode the second IMG tag will have all attributes deleted.
<img src="img_girl.jpg" width="500" &gt;&lt;img="">

Further notes

  1. I previously reported this in DrummerSupport repo as "Show or Hide HTML code in text" deletes attributes in second IMG tag.
  2. I confirmed this bug in Concord's Example 1 app given in the README.md.
  3. Unfortunately Example 1's Outliner > Toggle Render Mode menu command doesn't work. Console log shows error message toggleRenderMode is not defined. Keyboard command Ctrl-` also didn't work. However, reloading Example 1 webpage, does reload its outline in render mode. Inspecting DOM elements shows the current transfomed content of that headline (with all attributes deleted for the second IMG tag).
  4. It appears this bug is related to the bug reported by AndrewSchell concord.escape function img regex shouldn't be greedy.
  5. Andrew suggested a change to Line 996 of concord.js that includes new RegExp("&lt;"+tag+"((?!&gt;).+)(/)?&gt;","gi"). It appears that is now at Line 1016 of concord.js.
  6. Caveat: I'm more of a poet than a plumber, nowadays.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions