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

not working for comma or accented charactes #2

Closed
Koli14 opened this issue Mar 25, 2020 · 1 comment · Fixed by #3
Closed

not working for comma or accented charactes #2

Koli14 opened this issue Mar 25, 2020 · 1 comment · Fixed by #3
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Koli14
Copy link

Koli14 commented Mar 25, 2020

The convertXML function does not work if my XML contains Hungarian characters, or commas.
My XML looks like:

<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>A Feed Called szinhaz-online</title>
    <link>https://zapier.com/</link>
    <description>This feed is powered by Zapiers handy RSS service.</description>
    <atom:link rel="self" href="https://zapier.com/engine/rss/6937485/szinhaz-online"></atom:link>
    <lastBuildDate>Wed, 25 Mar 2020 10:49:13 +0000</lastBuildDate>
    <item>
      <title>"Nem az egyszemélyes vezetésben hiszek, hanem a közös gondolkodásban. Egy kör szellemiségében, egy közösség munkájában" - Rudolf Péter a Vígszínház igazgatója!!!-Színház Online</title>
      <link>https://www.instagram.com/p/B-H6_DfBmXT/</link>
      <description>1585068767</description>
      <guid isPermaLink="false">UtnIVKR2hdPW3Lri</guid>
      <enclosure url="https://scontent.cdninstagram.com/v/t51.2885-15/e35/90431296_563511611176976_226803942973685387_n.jpg?_nc_ht=scontent.cdninstagram.com&amp;_nc_ohc=XLhOXZ_TDogAX9i9bWd&amp;oh=1122595ececa8216cf43ac6cee4433d2&amp;oe=5EA30029" length="0" type="image/jpeg"></enclosure>
    </item>
  </channel>
</rss>

But if I remove characters like , ü ó ú ő á é, then it works.
I get the following error message, if it contains the characters above:

Error: Unknown Syntax : "" szinhaz.online.module.js line 5400 > eval:8:117
    next lexer.js:148
    parseExpr transpiler.js:52
    parseExpr transpiler.js:57
    parseExpr transpiler.js:57
    parseXML transpiler.js:44
    transpile transpiler.js:104
    convertXML xmlToJson.js:7
    Instagram instagram.js:22
    React 4
    batch scheduler.js:10
    batchedUpdates$1 React
    batch scheduler.js:10
    batched scheduler.js:25
    React 6
    performSyncWorkOnRoot self-hosted:919
    flushSyncCallbackQueueImpl React
    unstable_runWithPriority scheduler.development.js:653
    React 4
    batch scheduler.js:10
    batched scheduler.js:25
    (Async: promise callback)
    apply self-hosted:1871
    apply scheduler.js:42
    usePromise usePromise.js:19
    React 3
    batch scheduler.js:10
    batchedUpdates$1 React
    batch scheduler.js:10
    batched scheduler.js:25
    React 3
    unstable_runWithPriority scheduler.development.js:653
    React 3
    performSyncWorkOnRoot self-hosted:919
    flushSyncCallbackQueueImpl React
    unstable_runWithPriority scheduler.development.js:653
    React 4
    batch scheduler.js:10
    batched scheduler.js:25
    (Async: promise callback)
    apply self-hosted:1871
    apply scheduler.js:42
    asyncGeneratorStep index.tsx:10
    _next index.tsx:10
    _asyncToGenerator index.tsx:10
    _asyncToGenerator index.tsx:10
    default index.tsx:7
    <anonymous> client.ts:42
    <anonymous> client.ts:19
    <anonymous> self-hosted:875
    hotApply szinhaz.online.module.js:663
    cb process-update.js:76
    check process-update.js:91
    batch scheduler.js:10
    batchedUpdates$1 React
    batch scheduler.js:10
    batched scheduler.js:25
    (Async: promise callback)
    apply self-hosted:1871
    apply scheduler.js:42
    check process-update.js:90
    exports process-update.js:52
    processMessage client.js:279
    handleMessage client.js:139
    handleMessage client.js:102
    (Async: EventHandlerNonNull)
    init client.js:91
    EventSourceWrapper client.js:80
    getEventSourceWrapper client.js:126
    connect client.js:132
    <anonymous> client.js:33
    <anonymous> client.js:12
    js szinhaz.online.module.js:5864
    __webpack_require__ szinhaz.online.module.js:769
    fn szinhaz.online.module.js:130
    0 szinhaz.online.module.js:6328
    __webpack_require__ szinhaz.online.module.js:769
    <anonymous> szinhaz.online.module.js:907
    <anonymous> szinhaz.online.module.js:910
@nirgit nirgit self-assigned this Apr 10, 2020
@nirgit nirgit added bug Something isn't working good first issue Good for newcomers labels Apr 10, 2020
@nirgit nirgit linked a pull request Apr 10, 2020 that will close this issue
@nirgit nirgit closed this as completed in #3 Apr 10, 2020
@nirgit
Copy link
Owner

nirgit commented Apr 10, 2020

@Koli14 thank you for reporting this bug.
This should be fixed and published to NPM soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants