RDKB-63298: Font size issue while accessing from iOS#104
Conversation
Reason for change: Font size issue while accessing Gateway management restricted page from iOS Test Procedure: Test for Gateway management restricted page from iOS Risks:low Priority: P2 Signed-off-by: pavankumarreddy_balireddy@comcast.com
There was a problem hiding this comment.
Pull request overview
This PR attempts to address an iOS font size issue on the Gateway management restricted page by modifying the getBrandProductName() utility function to wrap its return value in a <span> tag. The change also includes a whitespace correction for consistency.
Changes:
- Modified
getBrandProductName()function to return HTML-wrapped text instead of plain string - Fixed indentation from spaces to tabs on line 901 for consistency
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| $brandName = getStr("Device.DeviceInfo.X_RDKCENTRAL-COM_Syndication.RDKB_UIBranding.CloudUI.brandname"); | ||
| $productName = getStr("Device.DeviceInfo.X_RDKCENTRAL-COM_Syndication.RDKB_UIBranding.CloudUI.productname"); | ||
| $ret = $brandName+' '+$productName; | ||
| $ret = '<span>'+$brandName+' '+$productName+'</span>'; |
There was a problem hiding this comment.
The brandName and productName values retrieved from device settings are being inserted directly into HTML without sanitization. If these values contain special characters or malicious content, this could lead to Cross-Site Scripting (XSS) vulnerabilities. Consider using HTML escaping before concatenating these values into the HTML string, or preferably, handle the HTML wrapping in the presentation layer rather than in this utility function.
| $brandName = getStr("Device.DeviceInfo.X_RDKCENTRAL-COM_Syndication.RDKB_UIBranding.CloudUI.brandname"); | ||
| $productName = getStr("Device.DeviceInfo.X_RDKCENTRAL-COM_Syndication.RDKB_UIBranding.CloudUI.productname"); | ||
| $ret = $brandName+' '+$productName; | ||
| $ret = '<span>'+$brandName+' '+$productName+'</span>'; |
There was a problem hiding this comment.
This change introduces HTML markup into a utility function that previously returned plain text data. This violates the separation of concerns principle by mixing presentation (HTML structure) with data retrieval logic. All other functions in this file return plain data, not HTML markup. If the iOS font size issue needs to be addressed, it should be done through CSS styling (e.g., using media queries or browser-specific styles) rather than by injecting HTML wrapper elements in the utility function. This approach would also make it easier to apply consistent styling across all usages and would be more maintainable.
| $ret = '<span>'+$brandName+' '+$productName+'</span>'; | |
| $ret = $brandName+' '+$productName; |
| $brandName = getStr("Device.DeviceInfo.X_RDKCENTRAL-COM_Syndication.RDKB_UIBranding.CloudUI.brandname"); | ||
| $productName = getStr("Device.DeviceInfo.X_RDKCENTRAL-COM_Syndication.RDKB_UIBranding.CloudUI.productname"); | ||
| $ret = $brandName+' '+$productName; | ||
| $ret = '<span>'+$brandName+' '+$productName+'</span>'; |
There was a problem hiding this comment.
The function comment states that it returns brandName + ' ' + productName (a plain string concatenation), but the implementation now returns HTML markup. The comment should be updated to accurately reflect that the function returns an HTML string with a span wrapper, or better yet, the implementation should be reverted to return plain text and the HTML wrapping should be handled in the presentation layer.
Reason for change: Font size issue while accessing Gateway management
restricted page from iOS
Test Procedure: Test for Gateway management restricted page from iOS
Risks:low
Priority: P2
Signed-off-by: pavankumarreddy_balireddy@comcast.com