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

HtmlEntity.Entitize(): incorrect handling of surrogate pairs (for example, emoji symbol) #323

Closed
msvprogs opened this issue Sep 2, 2019 · 3 comments
Assignees

Comments

@msvprogs
Copy link

msvprogs commented Sep 2, 2019

Description

HtmlEntity.Entitize() returns incorrect entity codes for surrogate pairs.
For example, 😂 should be converted as 😂 or 😂, but HtmlEntity.Entitize("😂", true, true) returns ��

Further technical details

  • HAP version: 1.11.9
  • NET version (net472, netcore, etc.): .NET Core 2.2
@JonathanMagnan JonathanMagnan self-assigned this Sep 3, 2019
@JonathanMagnan
Copy link
Member

Hello @msvprogs ,

Thank you for reporting, we will look at it.

Best Regards,

Jonathan


Performance Libraries
context.BulkInsert(list, options => options.BatchSize = 1000);
Entity Framework ExtensionsEntity Framework ClassicBulk OperationsDapper Plus

Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval FunctionSQL Eval Function

@JonathanMagnan
Copy link
Member

Hello @msvprogs ,

We added in the latest version the option UseWebUtility

When turned on (HtmlAgilityPack.HtmlEntity.UseWebUtility = true), we will use a different strategy to entitize value which should work in your case.

Let me know if everything works as expected.

Best Regards,

Jonathan

@msvprogs
Copy link
Author

msvprogs commented Oct 2, 2019

Yes, it works, thank you!

@msvprogs msvprogs closed this as completed Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants