Skip to content

webui: allow ^ characters in scripts of the script editor - #91

Open
jens-maus wants to merge 1 commit into
mainfrom
jens-maus/migrate-0076-webui-superchar-script-use
Open

jens-maus wants to merge 1 commit into
mainfrom
jens-maus/migrate-0076-webui-superchar-script-use

Conversation

@jens-maus

@jens-maus jens-maus commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Original OpenCCU rootfs patch: 0076
Original filename: 0076-WebUI-Fix-SuperCharScriptUse.patch
Original patch: https://github.com/OpenCCU/OpenCCU/blob/e49a57c5be83eb7b17d747266a5c08bf374e08d7/buildroot-external/package/openccu-base/rootfs-patches/0076-WebUI-Fix-SuperCharScriptUse.patch
Original issue: OpenCCU/OpenCCU#225

The script editor for program script actions sends the script to ReGa inside a super string (^...^). It does this in two places: for the syntax check in editScript.htm, and when the action is saved via iseSingleDestination.SetScript(). A ^ character in the script ended that super string early, so the syntax check failed and a script containing ^ could not be saved.

Both places now replace each ^ with ^#'^'#^ before embedding the script. This closes the super string, concatenates a single-quoted '^' and opens a new super string, so ReGa receives the original script unchanged.

Changed files:

  • src/webui/rega/www/pages/msg/editScript.htm (CRLF line endings preserved)
  • src/webui/www_source/ise/js/iseFunctions.js, which is part of the generated www/webui/webui.js (ISO-8859-1 encoding and LF line endings preserved)

The root www/ copies are unused legacy copies and are left unchanged.

Earlier OpenCCU rootfs patches also modify these files:

  • editScript.htm: patch 0046. Its hunks do not cover the changed line; patch 0046 adds its own, already escaped copy of the line.
  • webui.js: 21 patches (0001 to 0075). None of their hunks covers the changed line.

The later webui.js workspaces already contain the change, except the workspace of 0125. That workspace has been out of step with the chain since OpenCCU #4129; patch 0125 still applies with zero fuzz.

Validation

  • OpenCCU scripts/base-patch-migration.py validate with the canonical Buildroot 2026.08 git4 archive of this branch (fc051519, sha256 644ef87590ce56c905472f69e7fb4728ad76a29f9ba19c9a4affeece6f793a1d) and --skip-patch 0076: PASS (the other 112 rootfs patches apply with zero fuzz).
  • compare against the current pin baseline (4a428491, all 113 patches): IDENTICAL (4668 entries).

OpenCCU cleanup PR (patch removal, pin and archive hash update) will follow after this PR is merged.

The script editor for program script actions sends the script to ReGa
inside a super string (^...^), both for the syntax check in
editScript.htm and when saving the action via
iseSingleDestination.SetScript(). A ^ character in the script ended
that super string early, so the syntax check failed and a script
containing ^ could not be saved.

Replace each ^ with ^#'^'#^ before embedding the script. This closes
the super string, concatenates a single-quoted '^' and opens a new
super string, so ReGa receives the original script unchanged.

This natively replaces OpenCCU rootfs patch
0076-WebUI-Fix-SuperCharScriptUse.patch.
@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 44 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c196c8eb-39d1-463e-b2e5-6260b6216616

📥 Commits

Reviewing files that changed from the base of the PR and between 4a42849 and fc05151.

📒 Files selected for processing (2)
  • src/webui/rega/www/pages/msg/editScript.htm
  • src/webui/www_source/ise/js/iseFunctions.js
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant