Skip to content

Commit

Permalink
Restore Preview HTML (#785)
Browse files Browse the repository at this point in the history
* Unquote download URLs

Fixes 404 error when downloading Preview HTML, and possibly others

Cf. https://github.com/notepad-plus-plus/nppPluginList/commit/6a764d574e6220581cc20537dbdd2ed1a0392927#commitcomment-144093569\

* Revert "remove problematic plugin "preview html" for which download started to fail"

This reverts commit 6a764d5.
  • Loading branch information
rdipardo authored Jul 14, 2024
1 parent 6a764d5 commit d191ebb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/pl.x64.json
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,16 @@
"author": "Don HO",
"homepage": "https://github.com/npp-plugins/pork2sausage"
},
{
"folder-name": "PreviewHTML",
"display-name": "Preview HTML",
"version": "1.3.2.0",
"id": "127dbdd677b5f3f75661f06e67e4e2b35cb5e926863b6268a51c11e72a08f8ec",
"repository": "https://fossil.2of4.net/npp_preview/zip/PreviewHTML64.zip%3Fname%3D%26uuid%3Dv1.3.2.0-64",
"description": "Preview HTML files inside Notepad++ (or in a floating window) without having to save them first.",
"author": "Martijn Coppoolse",
"homepage": "https://fossil.2of4.net/npp_preview"
},
{
"folder-name": "Python Indent",
"display-name": "Python Indent",
Expand Down
10 changes: 10 additions & 0 deletions src/pl.x86.json
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,16 @@
"author": "Don HO",
"homepage": "https://github.com/npp-plugins/pork2sausage"
},
{
"folder-name": "PreviewHTML",
"display-name": "Preview HTML",
"version": "1.3.2.0",
"id": "b7538d5b4c61e7232ad6befe3a5eb1799544a4de741d4acd896716e9273f260b",
"repository": "https://fossil.2of4.net/npp_preview/zip/PreviewHTML32.zip%3Fname%3D%26uuid%3Dv1.3.2.0-32",
"description": "Preview HTML files inside Notepad++ (or in a floating window) without having to save them first.",
"author": "Martijn Coppoolse",
"homepage": "https://fossil.2of4.net/npp_preview"
},
{
"folder-name": "PyNPP",
"display-name": "PyNPP",
Expand Down
3 changes: 2 additions & 1 deletion validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import sys
import zipfile
from hashlib import sha256
from urllib.parse import unquote as unquote_url

import requests
from jsonschema import Draft202012Validator, FormatChecker
Expand Down Expand Up @@ -148,7 +149,7 @@ def parse(filename):
print(f' *** REQUIRES Npp {req_npp_version.strip()} ***')

try:
response = requests.get(plugin["repository"])
response = requests.get(unquote_url(plugin["repository"]))
except requests.exceptions.RequestException as e:
post_error(f'{plugin["display-name"]}: {str(e)}')
continue
Expand Down

0 comments on commit d191ebb

Please sign in to comment.