Skip to content

Long escaped URLs do not display correctly #216

@memcpy-rand-rand-rand

Description

@memcpy-rand-rand-rand

If escape codes are used to specify a URL as part of the prompt (where the URL has a separate display string), e.g,

�]8;;https://url.com/111111111111111111111111111111111111111123�\There should be a URL here?�]8;;�\

When the URL itself is above a certain length, the URL will not display correctly.

For this test-case:

  • URL with 1s only shows correctly - "There should be a URL here?" displays as a link with the right URL.
  • URL with 1s and 2 - displays "here should be a URL here?", missing off the first char of the display string and does not display as a clickable link.
  • URL with 1s,2, and 3 - nothing is displayed.

It appears to be due to the size of ecma84_state::buffer at 64 bytes. This gets filled with the control codes and URL string, up to 63 bytes. When attempting to add when the buffer is full, the last byte of the buffer is overwritten instead.

Testing a larger buffer against the URL resolves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions