Преглед изворни кода

Fix SetClipboardText for web (#3257)

pull/3266/head
ubkp пре 2 година
committed by GitHub
родитељ
комит
4fa66f2635
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 измењених фајлова са 1 додато и 1 уклоњено
  1. +1
    -1
      src/rcore.c

+ 1
- 1
src/rcore.c Прегледај датотеку

@ -2150,7 +2150,7 @@ void SetClipboardText(const char *text)
#if defined(PLATFORM_WEB)
// Security check to (partially) avoid malicious code
if (strchr(text, '\'') != NULL) TRACELOG(LOG_WARNING, "SYSTEM: Provided Clipboard could be potentially malicious, avoid [\'] character");
else emscripten_run_script(TextFormat("navigator.clipboard.writeText('%s')", text));
else EM_ASM( { navigator.clipboard.writeText(UTF8ToString($0)); }, text);
#endif
}

Loading…
Откажи
Сачувај