Coder Social home page Coder Social logo

Comments (9)

Rickaym avatar Rickaym commented on June 14, 2024

I believe this issue is within the gallery "Functions"
https://github.com/kolibril13/plywood-gallery-functions/blob/main/gallery_assets/gallery_parameters.json#L73-L78

image

from plywood-gallery-for-vscode.

kolibril13 avatar kolibril13 commented on June 14, 2024

Actually, this is on purpose, as can be seen here:

https://github.com/kolibril13/plywood-gallery/blob/ab4aaf9253778aac78e7f77aff5adaf27acd297b/plywood_gallery/plywood_tools.py#L93

When I would put the single quote instead of ' the JavaScript for the website would not work here:

https://github.com/kolibril13/plywood-gallery/blob/ab4aaf9253778aac78e7f77aff5adaf27acd297b/plywood_gallery/jinja2_template/template_index.html#L40

from plywood-gallery-for-vscode.

KekOnTheWorld avatar KekOnTheWorld commented on June 14, 2024

Is there any specific reason you are using .innerHTML over .innerText?

from plywood-gallery-for-vscode.

kolibril13 avatar kolibril13 commented on June 14, 2024

No, there is no specific reason.
What advantage would innerText have?

from plywood-gallery-for-vscode.

KekOnTheWorld avatar KekOnTheWorld commented on June 14, 2024

No, there is no specific reason. What advantage would innerText have?

Like the name suggests, it inserts text as text and not as html. This should also be prefered because of cross site scripting and such.

from plywood-gallery-for-vscode.

KekOnTheWorld avatar KekOnTheWorld commented on June 14, 2024

For example, these will do different things

// Will insert as text (=> you will see <p>Hello World</p>)
document.body.innerText = "<p>Hello world!</p>"
// Will insert as html (=> you will see 'Hello World' as a paragraph element)
document.body.innerHTML = "<p>Hello world!</p>" 

from plywood-gallery-for-vscode.

kolibril13 avatar kolibril13 commented on June 14, 2024

Ah nice!
Then I need document.body.innerText, I will change that!

from plywood-gallery-for-vscode.

KekOnTheWorld avatar KekOnTheWorld commented on June 14, 2024

This should be fixed now. Can you close this issue?

from plywood-gallery-for-vscode.

Rickaym avatar Rickaym commented on June 14, 2024

Yep, thanks.

Ricky.

from plywood-gallery-for-vscode.

Related Issues (5)

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.