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

[YouTube] Implement bold/italic/strike-through support #990

Merged
merged 3 commits into from
Nov 29, 2022

Conversation

FireMasterK
Copy link
Member

@FireMasterK FireMasterK commented Nov 28, 2022

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API.

Todo:

  • Tests

@FireMasterK FireMasterK added enhancement New feature or request youtube service, https://www.youtube.com/ labels Nov 28, 2022
@FireMasterK FireMasterK force-pushed the bold-italic-strikethrough branch 3 times, most recently from 94aea84 to da1814c Compare November 28, 2022 17:27
Copy link
Member

@AudricV AudricV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except my question below, LGTM!

@AudricV AudricV changed the title Implement bold/italic/strike-through support. [YouTube] Implement bold/italic/strike-through support Nov 28, 2022
@FireMasterK FireMasterK force-pushed the bold-italic-strikethrough branch from da1814c to 52fda37 Compare November 28, 2022 19:06
@FireMasterK FireMasterK merged commit abf08e1 into TeamNewPipe:dev Nov 29, 2022
@FireMasterK FireMasterK deleted the bold-italic-strikethrough branch November 29, 2022 15:59
@Stypox
Copy link
Member

Stypox commented Jan 4, 2023

This does not seem to work well for video descriptions. Calling getDescription().getContent() for this stream returns this description (I omitted most of it in [...]):

[...] a daily message from me: &lt;a href="https://www.youtube.com/c/yogawithadriene/community"&gt;https://www.youtube.com/c/yogawithadr...&lt;/a&gt;<br><br>SIGN UP at &lt;a href="https://do.yogawithadriene.com/center"&gt;https://do.yogawithadriene.com/center&lt;/a&gt; to receive [...]

As you can see the <br> tags are correct, while the <a> tags have &lt; and &gt; instead of < and >. So HTML renderers interpret those as escaped characters instead of as tag delimiters.

@FireMasterK
Copy link
Member Author

This does not seem to work well for video descriptions. Calling getDescription().getContent() for this stream returns this description (I omitted most of it in [...]):

[...] a daily message from me: &lt;a href="https://www.youtube.com/c/yogawithadriene/community"&gt;https://www.youtube.com/c/yogawithadr...&lt;/a&gt;<br><br>SIGN UP at &lt;a href="https://do.yogawithadriene.com/center"&gt;https://do.yogawithadriene.com/center&lt;/a&gt; to receive [...]

As you can see the <br> tags are correct, while the <a> tags have &lt; and &gt; instead of < and >. So HTML renderers interpret those as escaped characters instead of as tag delimiters.

I think this might be a side effect of #1005 instead 🤔

@TobiGr
Copy link
Contributor

TobiGr commented Jan 4, 2023

Escaping text right after if (html) { should do the job, i guess.

@FireMasterK
Copy link
Member Author

Escaping text right after if (html) { should do the job, i guess.

We already have such a check, yet this happens. Will need to investigate further.

@TobiGr
Copy link
Contributor

TobiGr commented Jan 4, 2023

that's not what i meant. see #1006

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request youtube service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants