Giter Club home page Giter Club logo

htmlstring's People

Contributors

alexisakers avatar jcsoohwancho avatar tomcheung avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

htmlstring's Issues

sporadic crashes on iOS 13 devices when using the removingHTMLEntities property

This issue is iOS 13 specific.

We use the removingHTMLEntities property on long html strings. We see this crash on rare occasions - about 800 cases per 1 million sessions. It also seems that similar calls on the same string would not result in a crash. So we believe this is a threading issue.

Crashlytics data:

crash_info:
Fatal error: file /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Binaries/swiftlang/install/TempContent/Objects/BNI_iOS/swift-macosx-x86_64/stdlib/public/core/8/UnsafeBufferPointer.swift, line 886

Stack trace:

Crashed: com.apple.main-thread
0  libswiftCore.dylib             0x1932103bc closure #1 in closure #1 in closure #1 in _assertionFailure(_:_:file:line:flags:) + 456
1  libswiftCore.dylib             0x19320f834 _assertionFailure(_:_:file:line:flags:) + 472
2  libswiftCore.dylib             0x19320fb3c _fatalErrorMessage(_:_:file:line:flags:) + 44
3  libswiftCore.dylib             0x19335aa08 _scalarAlign(_:_:) + 1010
4  libswiftCore.dylib             0x19335a21c _stringCompareInternal(_:_:expecting:) + 612
5  HTMLString                     0x103345f18 $sSS10HTMLStringE18removeHTMLEntitiesyyF + 236
6  HTMLString                     0x103346ebc $sSS10HTMLStringE21addingUnicodeEntitiesSSvgTm + 40

Privacy Manifest

Hi,

I was wondering if there was a plan to do an update to include Privacy Manifest file?

Looking at the latest commits, I wonder if the project is still maintained too 😐

removingHTMLEntities doesn't work if text includes non-encoded & character

I'm using the library to remove HTML entities from Strings on my tvOS project and found out that a string like: Mary & Joe are getting "Married\", due to the & between Mary and Joe words. It returns the String as is without replacing any HTML entities.
If I remove that or even encode it as HTML entities, than calling removingHTMLEntities works as expected.

removingHTMLEntities will throw fatal error if decode JSONSerialization string

I am using library with Xcode 10.2.1 (Swift 5), and found following code will throw Fatal error inside removeHTMLEntities

let jsonString = "{\"sepcialCharacter\": \"𝟸𝟺𝟢°\"}"
let json = try! JSONSerialization.jsonObject(with: jsonString.data(using: .utf8)!, options: []) as! [String:String]

let sepcialCharacter = json["sepcialCharacter"]!
sepcialCharacter.removingHTMLEntities

After investigation, seem this error may cause by NSString to swift String bridging with following code, not sure this is the bug in swift or the library itself

let nsSepcialCharacter = NSString("𝟸𝟺𝟢°")
let sepcialCharacter = nsSepcialCharacter as String
sepcialCharacter.removingHTMLEntities

Should HTMLString handle curly quotes and ellipsis?

I may be using it incorrectly, but shouldn't HTMLString encode β€œβ€ (left and right curly quotes) into β€œ and ” and ellipsis … into …? I do this manually now before calling addingUnicodeEntities. Or do I misunderstand how it should work?

Infinite loop in -[NSString stringByRemovingHTMLEntities]

I'm using HTMLStrings 6.0.0. Looks like simply calling -[NSString stringByRemovingHTMLEntities] is causing an infinite loop. See attached.

Screen Shot 2020-09-28 at 12 17 56 PM

Example invocation context:

NSString *const htmlEncodedString = @"Apple's Tim Cook on a "giant leap" in social progress;
NSString *const noEntities = [htmlEncodedString stringByRemovingHTMLEntities]; // Hangs

Xcode 10.2

it's really strange but Xcode 10.2 freeze on HTMLString during a creation of the archive.

CocoaPod version 5.0 is not properly tagged

The README.md suggests that "~> 5.0" is the current Pod version but the tag for it does not exist (I didn't check the master repo if that is ok though).

Your readme pod badge also suggests that the latest version is 4.0.2.

Carthage failed with exit code 128

I'm try using carthage, run carthage update command in bash, then error shows:

A shell task (/usr/bin/env git clone --bare --quiet https://github.com/alexaurby/HTMLString.git /Users/virus1993/Library/Caches/org.carthage.CarthageKit/dependencies/HTMLString) failed with exit code 128:
remote: Repository not found.
fatal: repository 'https://github.com/alexaurby/HTMLString.git/' not found

My Carthage file:

github "alexaurby/HTMLString" ~> 4.0

Oooops!

It should be:

github "alexaubry/HTMLString" ~> 4.0

Your should correct README.md. it almost let me give up this nice framework.

Thanks to your framework, save lots of my time to Unescape some horrible text.

Have a nice day!

Broken Dash link

Hi! the Dash link is pointing to dash-feed://https%3A%2F%2Falexaubry%2Egithub%2Eio%2Fdocsets%2FHTMLString%2Exml (ironically this link has many html escaped characters)(https://alexaubry.github.io/docsets/HTMLString.xml) instead of https://alexaubry.github.io/HTMLString/docsets/HTMLString.xml.

And the xml file looks like:

<entry>
    <version>4.0.0</version>
    <url>https://alexaubry.github.io/docsets/HTMLString.tgz</url>
</entry>

instead of <url>https://alexaubry.github.io/HTMLString/docsets/HTMLString.tgz</url>

This can be fixed in a pr, but maybe it's better to fix this in docs generate script thing?

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.