Skip to content

Problem trying to export epub with html <a> </a> tags #15

@yannisbarlas

Description

@yannisbarlas

Migrated from GitLab
Original Author: Dione Mentis (@DioneMentis)
Original Link: https://gitlab.coko.foundation/coko-org/products/ketty/editoria/-/issues/5

We had problems with .docx files containing html tags of type <a> </a>, when we wanted to export them to epub. Checking the code in the file: bookContructor.js through a regular expression we excluded this type of tags and allowed to export them.

Code:

if (/(<a(.*?)>)+/gi.test(contentBook)) {
        contentBook = contentBook.replace(/(<a(.*?)>)+/gi, '')
      }

if (/(<\/a>)+/gi.test(contentBook)) {
        contentBook = contentBook.replace(/(<\/a>)+/gi, '')
      }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions