Coder Social home page Coder Social logo

Comments (5)

DavidMStraub avatar DavidMStraub commented on August 18, 2024 2

Nevermind, found a way 😉

from gramps-web.

DavidMStraub avatar DavidMStraub commented on August 18, 2024 1

Good idea. We already do this in notes:

https://github.com/gramps-project/gramps-web/blob/main/src/components/GrampsjsNoteContent.js#L4-L12

So, should be straightforward to generalize.

from gramps-web.

TheMihle avatar TheMihle commented on August 18, 2024

Good idea. We already do this in notes:

https://github.com/gramps-project/gramps-web/blob/main/src/components/GrampsjsNoteContent.js#L4-L12

So, should be straightforward to generalize.

I did notice its already done in Notes.

If you end up doing it for Gramps Web, is it easy to include in for example Narrative Web and Dynamic Web report too? Like could it maybe just be copy pasted in to those too?
I ask mostly because I am curious.

from gramps-web.

DavidMStraub avatar DavidMStraub commented on August 18, 2024

I realized this is a bit trickier than anticipated.

For notes, we're injecting the anchor tags into the note HTML after rendering it. But this is only safe because note content is sanitized by the backend.

For the other elements, they may contain unsafe HTML code in principle - this is not an issue because Lit will not render it as HTML. But if would use the same approach as in notes, we would have to render the raw (unsanitized) string which could contain malitious code.

So this needs a bit more thought to implement in a safe way; either by sanitizing those elements in the backend or finding a way to use lit-html to replace the URLs.

from gramps-web.

DavidMStraub avatar DavidMStraub commented on August 18, 2024

Note complete - citation page & attribute values done, source publication missing.

from gramps-web.

Related Issues (20)

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.