File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -252,6 +252,9 @@ function generateErrorCard(string $message, array $params = null): string
252252 return "<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' style='isolation:isolate' viewBox='0 0 495 195' width='495px' height='195px'>
253253 <style>
254254 @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700);
255+ a {
256+ fill: {$ theme ["dates " ]};
257+ }
255258 </style>
256259 <defs>
257260 <clipPath id='_clipPath_OZGVUqgkTHHpPTYeqOmK3uLgktRVSwWw'>
@@ -307,11 +310,11 @@ function convertSvgToPng(string $svg): string
307310 $ svg = trim ($ svg );
308311
309312 // remove style and animations
310- $ svg = preg_replace ('/(<style>\X*? <\/style>)/m ' , '' , $ svg );
313+ $ svg = preg_replace ('/(<style>\X*<\/style>)/m ' , '' , $ svg );
311314 $ svg = preg_replace ('/(opacity: 0;)/m ' , 'opacity: 1; ' , $ svg );
312315 $ svg = preg_replace ('/(animation: fadein.*?;)/m ' , 'opacity: 1; ' , $ svg );
313316 $ svg = preg_replace ('/(animation: currentstreak.*?;)/m ' , 'font-size: 28px; ' , $ svg );
314- $ svg = preg_replace ('/<a href \X*?>(\X*?)<\/a>/m ' , '\1 ' , $ svg );
317+ $ svg = preg_replace ('/<a \X*?>(\X*?)<\/a>/m ' , '\1 ' , $ svg );
315318
316319 // create canvas
317320 $ imagick = new Imagick ();
You can’t perform that action at this time.
0 commit comments