Skip to content

ClientSideText text property does not return full HTML #46

@estruyf

Description

@estruyf

Category

  • Enhancement
  • Bug
  • Question
  • Documentation gap/issue

Version

Please specify what version of the library you are using: [1.0.3]

Expected / Desired Behavior / Question

It appears that the ClientSideText part is not returning the whole HTML block. During my investigation I had the following contents created in my text web part:

screenshot 2018-03-13 12 33 59

When I try to retrieve the HTML from this web part, it only returns the table, the text in red + quote is removed.

During a debug run I saw this:

screenshot 2018-03-13 13 33 35

After the regex match, I get this:

screenshot 2018-03-13 13 43 30

Testing out the used regex to get the HTML you see that part of it gets excluded:

screenshot 2018-03-13 13 56 50

The /<div[^>]*data-sp-rte[^>]*>(.*?)<\/div>/i should be changed to /<div[^>]*data-sp-rte[^>]*>(.*?)<\/div>$/i in order to get the whole HTML block:

screenshot 2018-03-13 13 57 34

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions