Skip to content

There is no need to change innerHTML to insert values from the store there - it is enough to change innerText #4309

@budarin

Description

@budarin

What docs page needs to be fixed?

  • \docs\tutorials\fundamentals\part-1-overview.md
  • \docs\tutorials\fundamentals\part-5-ui-and-react.md
  • \examples\counter-vanilla\index.html

What is the problem?

Store stores values - not html, it makes no sense to change html and for security purposes

What should be changed to fix the problem?

valueEl.innerHTML = state.value.toString()

should be changed to

valueEl.innerText = state.value.toString()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions