Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html encoding in anilist description #291

Open
4 tasks done
pingu6 opened this issue Aug 6, 2023 · 1 comment
Open
4 tasks done

html encoding in anilist description #291

pingu6 opened this issue Aug 6, 2023 · 1 comment
Labels

Comments

@pingu6
Copy link

pingu6 commented Aug 6, 2023

Acknowledgements

  • Ensure that Houdoku is up-to-date (check the About tab).
  • Check that there is not an existing ticket for this issue, and that it is not related to an existing ticket.
  • If this is an issue with an extension, open a ticket in the extensions repo instead.
  • Write a concise title for this ticket in the field above.

Houdoku version

2.13.0

Operating system

Windows 10

Steps to reproduce

Houdoku_7pMfBUODnK

note it only show in the trackers search

Expected behavior

description without html ig?

Actual behavior

Houdoku_pMzSbkZBLO

Log files

No response

Additional information (optional)

No response

@pingu6 pingu6 added the bug label Aug 6, 2023
@Sajid2001
Copy link

Sajid2001 commented Nov 14, 2023

I was able to fix this bug.

Code changes (v2.13.0)

[./services/trackers/anilist.ts lines 147-153] - (Removes the html tags inside the description)

        const regex = /(<([^>]+)>)/gi;
        return data.data.Page.media.map((media: any) => ({
          id: media.id,
          title: media.title.romaji,
          description: media.description === null ? '' : media.description.replace(regex,""),
          coverUrl: media.coverImage.large,
        }));

Before

image

After

image

[./src/components/library/tracker/SeriesTrackerModalTab.tsx lines 311-322] - (Clicking on Settings in Tracker modal redirects to the Settings tab)

 const renderTrackerContent = (trackerMetadata: TrackerMetadata) => {
    if (!username) {
      return (
        <Text mt="xs">
          In order to track this series, please link your {trackerMetadata.name} account through the{' '}
          <Anchor onClick={() => navigate('/Settings')} component="span" color="blue" weight={700}>
            Settings
          </Anchor>{' '}
          tab.
        </Text>
      );
    }

image

@xgi Where can I push these changes for review? (I am a new to this project)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants