feediron / ttrss_plugin-feediron

Evolution of ttrss_plugin-af_feedmod
https://discourse.tt-rss.org/t/plugin-update-feediron-v1-2-0/2018
MIT License
204 stars 34 forks source link

Export of recipe with <br> will insert literal newline. #162

Closed uqs closed 3 years ago

uqs commented 3 years ago

Expected Behavior

Recipes with <br> in their code should export properly.

Current Behavior

<br> gets turned into a newline.

Steps to Reproduce

Write a recipe like so:

    "oglaf.com": {
        "type": "xpath",
        "xpath": [
            "img[@id='strip']",
            "img[@id='strip']\/@title",
            "img[@id='strip']\/@alt"
        ],
        "multipage": {
            "xpath": "a[@class='button next']",
            "append": true,
            "recursive": true
        },
        "join_element": "<br>"
    },
  1. click export
  2. you get
{
    "name": "oglaf.com",
    "url": "oglaf.com",
    "stamp": 1599239646,
    "author": "",
    "match": "oglaf.com",
    "config": {
        "type": "xpath",
        "xpath": [
            "img[@id='strip']",
            "img[@id='strip']\/@title",
            "img[@id='strip']\/@alt"
        ],
        "multipage": {
            "xpath": "a[@class='button next']",
            "append": true,
            "recursive": true
        },
        "join_element": "
"
    }
}

Note how the <br> in join_element has disappeared for a newline.