This is an automated email from the ASF dual-hosted git repository. tai pushed a commit to branch tai/fix-title in repository https://gitbox.apache.org/repos/asf/superset.git
commit 6394d2715d9fc32842a4a12f5705e94c7e4f3b26 Author: Tai Dupree <[email protected]> AuthorDate: Tue Dec 5 14:36:04 2023 -0800 fix(dashboard): title formatting --- .../src/components/DynamicEditableTitle/index.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/superset-frontend/src/components/DynamicEditableTitle/index.tsx b/superset-frontend/src/components/DynamicEditableTitle/index.tsx index 86205bebc2..9c96a988de 100644 --- a/superset-frontend/src/components/DynamicEditableTitle/index.tsx +++ b/superset-frontend/src/components/DynamicEditableTitle/index.tsx @@ -113,10 +113,12 @@ export const DynamicEditableTitle = ({ // then we can measure the width of that span to resize the input element useLayoutEffect(() => { if (sizerRef?.current) { - sizerRef.current.innerHTML = (currentTitle || placeholder).replace( - /\s/g, - ' ', - ); + sizerRef.current.innerHTML = (currentTitle || placeholder) + .replaceAll('&', '&') + .replaceAll('<', '<') + .replaceAll('>', '>') + .replaceAll('"', '"') + .replaceAll("'", '''); } }, [currentTitle, placeholder, sizerRef]);
