MWE:
test.tex:
% !TeX program = xelatex
\documentclass[paper=A4,fontsize=12pt]{scrartcl}
\usepackage[left=3cm, right=3cm, bottom=3cm, top=3cm]{geometry}
\usepackage{fontspec}
\usepackage[backend=biber,style=authoryear,citestyle=authoryear]{biblatex}
\DeclareNameAlias{sortname}{last-first}
\DeclareNameAlias{default}{last-first}
\setcounter{biburllcpenalty}{7000}
\setcounter{biburlucpenalty}{9999}
\addbibresource{resources.bib}
\begin{document}
\cite{Test.2018}
\printbibliography
\end{document}
resources.bib:
@misc{Test.2018,
author = {{testauthor test author testauthor}},
year= {2018},
title = {{testfile test file testfile}},
url = {http://abcdefghijklmnopqrstuvwxy.com/phrrFK5dS1ztTjiaCmveRARXpGBtV01U%20B93FcrxkOVhj2CceIguNuUPpwDaUD4GjTTWh9cL30D6rLgWxapYlhegDXQGFlE0hao7B2YS227ca%20keoWHWNmQVKVcNOUFxfsCp0SwCElfTVtpMv6DKqiSwhWgO2zrHvstd4UNBo99UQBSCTkzL7lD2UyRLTRy6xXdJ}
}
Here the URL does not break properly due to the fontspec package changing the parindent. How can I fix this?
\begingroup
\sloppy
\printbibliography
\endgroup
This makes the URL look extremely ugly with the first line not even justified. It is just this one weird character extending into the border. I do not want to use any weird workarounds like using the url package and changing the bibliography when BibLaTeX supports URLs natively with Biber.



\sloppy. But usually real URL are less badly behaved (even if nasty enough!), so the real case might get you a better solution. – gusbrs Dec 16 '18 at 18:29\setcounter{biburlnumpenalty}{9900}(or some other value), to also allow breakpoints after numbers. – Skillmon Dec 16 '18 at 18:33biblatexloads theurlpackage and it isurlthat providesbiblatex's support for urls. So, you might as well use its options, if they do get things better. – gusbrs Dec 16 '18 at 18:47