- Removed `COMMON_ERRORS.md` file to streamline documentation. - Added `Flask-Limiter` for rate limiting and `redis` for session management in `requirements.txt`. - Expanded `ROADMAP.md` to include completed security features and planned enhancements for version 2.2. - Enhanced `setup_myp.sh` for ultra-secure kiosk installation, including system hardening and security configurations. - Updated `app.py` to integrate CSRF protection and improved logging setup. - Refactored user model to include username and active status for better user management. - Improved job scheduler with uptime tracking and task management features. - Updated various templates for a more cohesive user interface and experience.
11 lines
458 B
JavaScript
11 lines
458 B
JavaScript
export default function ansiRegex({onlyFirst = false} = {}) {
|
|
// Valid string terminator sequences are BEL, ESC\, and 0x9c
|
|
const ST = '(?:\\u0007|\\u001B\\u005C|\\u009C)';
|
|
const pattern = [
|
|
`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
|
|
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))',
|
|
].join('|');
|
|
|
|
return new RegExp(pattern, onlyFirst ? undefined : 'g');
|
|
}
|