Originally posted by **daraul** September 22, 2023
I transfer my annotations into org-mode with the template below. How would I go about URL encoding `this` in the `ROAM_REFS` property? Think of javascript's `encodeURIComponent`.
```toml
annotation_template = '''
{{#each highlight}}** {{this}} {{#each ../tags}}:{{this}}{{#if @last}}:{{/if}}{{/each}}
:PROPERTIES:
:ANNOTATION_ID: {{../id}}
:ROAM_REFS: [[{{../uri}}#:~:text={{this}}]]
:CREATED: {{date_format "%c" ../created}}
:END:
{{../text}}
{{/each}}
'''
```
Discussed in https://github.com/out-of-cheese-error/gooseberry/discussions/100