Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed various issues with escaping in CodeLite generator #1275

Merged
merged 1 commit into from
Jun 7, 2019

Conversation

samsinsane
Copy link
Member

No description provided.

function codelite.esc(value)
local result = value:gsub('&', '&')
result = result:gsub('<', '&lt;')
result = result:gsub('>', '&gt;')
result = result:gsub('"', '&quot;')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you see further divergence that would prevent esc calling escElementText?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to err on the side of caution with this, the escaping seems to be very fragile and inconsistent in CodeLite and I wanted to avoid future issues. For example, not escaping quotes results in the cURL project to silently fail to load in the Premake workspace - I believe there's another project that fails too.

modules/codelite/codelite_project.lua Outdated Show resolved Hide resolved
@alex-rass-88
Copy link

What about merging? CodeLite generator broken.

@samsinsane
Copy link
Member Author

@tdesveauxPKFX I made more changes since you last reviewed, but I'm going to merge this since as @alex-rass-88 has pointed out the generator is broken without these fixes.

@samsinsane samsinsane merged commit f930e70 into premake:master Jun 7, 2019
@samsinsane samsinsane deleted the ssurtees/codeliteFixes branch June 7, 2019 03:54
@Jarod42 Jarod42 mentioned this pull request Aug 30, 2020
5 tasks
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.

None yet

3 participants