Skip to content

Commit

Permalink
Use uri-encode
Browse files Browse the repository at this point in the history
This creates strange URIs. Probably needs to be fixed in metafacture-fix.
  • Loading branch information
TobiasNx committed Jul 4, 2023
1 parent e755b4c commit f6989f2
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 97 deletions.
9 changes: 8 additions & 1 deletion conf/fix-dbs.fix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ end
# <data source="inr" name="inr">
# <replace pattern=" " with=""/>
# </data>
# <data source="isil" name="isil">
# <not-equals string="NULL"/>
# <replace pattern=" " with=""/>
# <not-equals string=""/>
# <replace pattern="/" with="-"/>
# <urlencode/>
# </data>


replace_all("inr"," ","")
Expand All @@ -30,7 +37,7 @@ end
if any_match("isil","NULL")
remove_field("isil")
end
# TODO: uri_encode("isil")
uri_encode("isil")



Expand Down
Loading

2 comments on commit f6989f2

@dr0i
Copy link
Member

@dr0i dr0i commented on f6989f2 Jul 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could enhance metafix to introduce safe-chars, see discussion at metafacture/metafacture-fix#314 (comment).
I don't think that the - was not escaped before, see https://github.com/metafacture/metafacture-core/blob/master/metamorph/src/main/java/org/metafacture/metamorph/functions/URLEncode.java.
Also: metafix uses said metamorph function, besides the PlusForSpace.

@dr0i
Copy link
Member

@dr0i dr0i commented on f6989f2 Jul 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.