alct/export-tabs-urls

Escape HTML markup in titles when custom format contains HTML

Closed this issue · 4 comments

Hello

May you please add an option so user can set some pre-defined characters in the settings page of add-on so it remove them from results.

The use case for this is that I seted a custom format in HTML so I can paste the result to a pre-created HTML file that has HTML tags and so I can use that page as a page for my sessions.


I came up with this approach because onetab addon i corrently use for session management, don't have sync option and also if it had it isn't available for mobile but this way i can simply sync HTML file with cloud storage and open it in mobile also

Also i don't like bookmark approach because i heavily use bookmarking system and the session managers that use bookmarking system may be change my bookmarked page to the session bookmark folder and it will be really annoying because most of the time i have bookmarked pages in my session and want it to be open and shown in my sessions list


the problem I faced here is that because I used HTML here (because I want to open it with browser) when the pages in my session have any HTML tags they don't show correctly and they become affected to the HTML file I created.

Excuse me, I don't know if I could explain it understandable or not :)

I will paste the examples here some minutes later.

Thanks

I created an pre-cretaed HTML page to paste my sessions to it, like this:

<Title>Session</Title>
<Body>
<p>
<ul>

</ul>
</p>
</Body>

The i defined the custom format in addons settings like this:

<li><a href="{url}" target="_blank">{title}</a></li></br>\r\n

The problem is if my browsing session tabs contains one or more HTML tags in their URL or Title, my file shown badly in browser because it also interprets those tags that are in Titles or URLs.

for example the addon gave me these results:

<li><a href="https://stackoverflow.com/questions/13688158/when-to-use-p-vs-br" target="_blank">html - When to use <p> vs. <br> - Stack Overflow</a></li></br>
<li><a href="https://www.sololearn.com/Discuss/620208/what-is-the-difference-between-p-and-br" target="_blank">What is the difference between <p> and <br>? | SoloLearn: Learn to code for FREE!</a></li></br>
<li><a href="https://www.quora.com/What-is-the-difference-between-a-p-tag-and-br-tag" target="_blank">What is the difference between a p tag and br tag? - Quora</a></li></br>
<li><a href="https://www.mozilla.org/en-US/firefox/new/?redirect_source=firefox-com" target="_blank">Download Firefox — Free Web Browser — Mozilla</a></li></br>

the i paste them to that HTML file i said above and it becomes this:

HTML file for test:
https://upload.disroot.org/r/y9XSSOLz#q2tCcJrT+dtZMYI36NR1w4boXOs8XVbSDx5ZGY6oaQo=

Screenshot:

Example_Results_result

Please help to fix this if may.
Thanks


Update: i checked and seems that this addon suggested in another issue [+] don't have this problem.
I don't know how its developer prevented that, This is its github oage so you can find out the issue if you like [+]

Thank you

alct commented

Hello,

Thank you for your feedback.

The problem here is specific to the fact that you are generating HTML. ETU should account for that and avoid breaking your output. I will have a look into it.

alct commented

Implemented in 2.0.12, see 52cc428

Thank you very much :)