Giter Club home page Giter Club logo

Comments (4)

koehnlein avatar koehnlein commented on August 22, 2024 1

I spent some minutes to find more information about the problem. Thanks to @mcmietz for the hint with the code lines. The problem, I found is that ...

return this.nodeValue.replace(/(\­|\­)/gi, "↵");

... does not simply replace text, but really builds DOM and replaces the old DOM. This can be seen in action, when adding some markup to the header field:

default behavior with EXT:shyguy
Bildschirmfoto 2021-03-25 um 17 28 44 Bildschirmfoto 2021-03-25 um 17 30 52

I think the solution would be to replace the html special characters in the string before returning the value.

from shyguy.

mcmietz avatar mcmietz commented on August 22, 2024 1

I tested your fix in our case and it looks good, also seems to be the solution for our problem.

Thanks a lot

from shyguy.

mcmietz avatar mcmietz commented on August 22, 2024

https://github.com/WapplerSystems/Shyguy/blob/master/Resources/Public/Javascript/Shyguy.js

Line 46 - 50

.replaceWith(function() {
return this.nodeValue.replace(/(­|\­)/gi, "↵");
});

    Maybe it try to render the html from textarea but it shouldn´t. 
    
    Solution would be, ignore CType=html ?

from shyguy.

koehnlein avatar koehnlein commented on August 22, 2024

There seems to be a similar problem with HTML tags in all content elements and not only CType=html. We have some hard coded HTML tags inside a CType=table content element.

foo|<b>bar</b>
foo|bar

When opening the backend form, the textarea is rendered as expected but immediatly replaced with new content without HTML tags and their content. So the example above becomes:

foo|
foo|bar

from shyguy.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.