Closed ondrabus closed 2 years ago
@Enngage any updates on this?
@ondrabus I'm still not sure whether to use this or not. It's also a major change (unless we make this optional). The regex seems quite simple, but what if you want to use "object" within the resolver? I'm just not sure ;) @Simply007 has any opinion on this?
@Enngage I'm not saying it's the best solution :-) it's just a temp workaround that doesn't look good. Feel free to propose a better solution. I just want to get the problem that clearly exists solved :-)
@ondrabus I'm still not sure whether to use this or not. It's also a major change (unless we make this optional). The regex seems quite simple, but what if you want to use "object" within the resolver? I'm just not sure ;) @Simply007 has any opinion on this?
I would expect that <object>
tag would be replaced by the resolution. On the other hand there are already people that used the resolver and they might expect to have the <object>
tag being in the resolved HTML (i.e. they have some CSS selectors depending on it).
So I would choose between making it configurable, or changing the behavior (which is by the book breaking change).
@Enngage any updates on this?
Will be released in next version. Currently, all preserveResolvedObjectTags
of resolveRichText
method to preserve tags if needed.
Brief bug description
After resolving rich text elements, the
Repro steps
Expected behavior
Once an external resource gets resolved, the
Additional context
Currently, the problem can be mitigated using the following regex: .replace(/<object.?data-sdk-resolved=\"1\".?>(.*?)<\/object>/ms, '$1') However, it's not a good practice to keep code fixes of SDK issues in the project code not to mention the external dependencies (the use of "" tag and
data-sdk-resolved
attribute).