Skip to content

Commit

Permalink
Fix unit icon paths and Chinese filenames not auto-completing URLs. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
VM8gkAs authored Sep 27, 2024
1 parent 5585c29 commit dd7a9a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class ProjectInfoAuthoringComponent {

protected setFeaturedProjectIcon(projectIcon: string): void {
this.projectService.setFeaturedProjectIcon(projectIcon).then(() => {
this.projectIcon = `projectIcons/${projectIcon}`;
this.projectIcon = `/projectIcons/${projectIcon}`;
this.showProjectIcon();
this.closeEditProjectIconMode();
});
Expand Down
2 changes: 1 addition & 1 deletion src/assets/wise5/services/projectService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ export class ProjectService {
// note that this also works for \"abc.png and \'abc.png, where the quotes are escaped
contentString = contentString.replace(
new RegExp(
"('|\"|\\\\'|\\\\\")[^:][^/]?[^/]?[a-zA-Z0-9@%&;\\._\\/\\s\\-']*[.]" +
"('|\"|\\\\'|\\\\\")[^:][^/]?[^/]?[a-zA-Z0-9\u4e00-\u9fa5@%&;\\._\\/\\s\\-']*[.]" +
'(png|jpe?g|pdf|gif|mov|mp4|mp3|wav|swf|css|txt|json|xlsx?|doc|html.*?|js).*?' +
'(\'|"|\\\\\'|\\\\")',
'gi'
Expand Down

0 comments on commit dd7a9a3

Please sign in to comment.