Class EncodeFor

java.lang.Object
ortus.boxlang.runtime.bifs.BIF
ortus.boxlang.modules.esapi.bifs.EncodeFor

@BoxBIF @BoxBIF(alias="esapiEncode") public class EncodeFor extends ortus.boxlang.runtime.bifs.BIF
  • Field Summary

    Fields inherited from class ortus.boxlang.runtime.bifs.BIF

    __functionName, __isMemberExecution, asyncService, cacheService, componentService, declaredArguments, functionService, interceptorService, moduleService, runtime
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    _invoke(ortus.boxlang.runtime.context.IBoxContext context, ortus.boxlang.runtime.scopes.ArgumentsScope arguments)
    Encodes a given string for safe output in the specified context.

    Methods inherited from class ortus.boxlang.runtime.bifs.BIF

    announce, getDeclaredArguments, invoke

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EncodeFor

      public EncodeFor()
      Constructor
  • Method Details

    • _invoke

      public String _invoke(ortus.boxlang.runtime.context.IBoxContext context, ortus.boxlang.runtime.scopes.ArgumentsScope arguments)
      Encodes a given string for safe output in the specified context. The encoding is meant to mitigate Cross Site Scripting (XSS) attacks.
      Specified by:
      _invoke in class ortus.boxlang.runtime.bifs.BIF
      Parameters:
      context - The context in which the BIF is being invoked.
      arguments - Argument scope for the BIF.